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 does CLR do as soon as an assembly is created ?

2 Answers   MMTS,


What is associationset? : Entity framework

0 Answers  


How the ‘page lifecycle’ of ASP.Net MVC does works?

0 Answers  


reading doc file in textbox using .net2005 with c#

3 Answers  


How to bind table coloum with gridview column

3 Answers   Sypher Technologies,


What are the levels at which filters can be applied in an asp.net mvc application?

0 Answers   NA,


Why to use Html.Partial in ASP.Net MVC?

0 Answers  


How large is the .net framework 3.0?

0 Answers  


List the new features added in .net framework 4.0.

0 Answers  


How route table is created in ASP.NET MVC?

0 Answers   NA,


What are the versions of .net framework?

0 Answers  


mention in what all scenarios entity framework can be applicable?

0 Answers   Microsoft,


Categories