Custom roles based ASP.NET menu

N

neerajb

Hi, I have a question with respect to the security implementation of Menu
using sitemap. Normally in the sitemap we can implement role based security
but that is based on the Role based functionality provided by ASP.NET.
Actually in our site we are using custom roles with our own role management
and stuff. So is there a way to hide or show certain elements of the Sitemap
in my menu based on the custom roles without using asp.net roles
 
G

Gregory A. Beamer

I see two ways to tackle this (three if you include build everything from
scratch).

1. Alter your role management to inherit from the Microsoft Role Management
bits. This is the simplest, as long as it does not completely tear up your
model. You then have to hook in the MS events to your role management and
you are done.

2. Implement a custom site map provider and override the security trimmings
behavior. This may be easy (have not looked), but I would imagine it is a
bear, as I have seen little blogged about it.


"(e-mail address removed)"
 
N

neerajb

Hi,

THanks for your response. Is there is any code related to 2nd approach you
suggested.
 
N

neerajb

Thanks Gregory for the quick response.

I went through the msdn article but still not able to understand htat how my
application will come to know about the logged in User role as i ma using the
roles defined in database .

Please help.
Neeraj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top