Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you do role based security ?



How do you do role based security ?..

Answer / narayansahu

1.Create a principle object which contains users identity
(login name) and array of roles
2.and pass this object to HttpContext.Current.User
3.The roles supplied to this object will be checked against
roles specified in the web.config file,if they matched then
they are allowed access to the page otherwise not.

allowed roles can be specified like this in web.config
<authorization>
<allow roles="Administrator,CanEdit"/>
<deny users="*" />
</authorization>

Is This Answer Correct ?    17 Yes 1 No

Post New Answer

More Dot Net Framework Interview Questions

What are Action Methods in ASP.NET MVC?

0 Answers  


what is deferred loading(lazy loading)?

0 Answers   Microsoft,


What are the 3 segments of the default route, that is present in an ASP.NET MVC application?

0 Answers   NA,


What is global assembly cache

2 Answers   BirlaSoft,


What is the difference between model view and controller?

0 Answers  


How to bind table colum with gridview column?

0 Answers  


How to answer for project questions..?

0 Answers  


how many ways for pass the parameters in the fuction in c#

4 Answers  


Can u tell me differences which are introduced in .Net 1.1 and 2.0 and 3.0 and also in 3.5 ? by detailed?

1 Answers   ABC,


What are the difference between asynchronous controller implementation between asp.net mvc 3 & asp.net mvc 4?

0 Answers  


differences between poco, model first and data first approach?

0 Answers   Microsoft,


How to make sure Client Validation is enabled in ASP.Net MVC

0 Answers   B-Ways TecnoSoft,


Categories