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

How to identify the Code which Complies corresponding Compiler in .NET? Means Suppose, i am taking One project A.. in which code is implemented using C# langugge. And Another Project B..in Which Code is implemented using VB.NET. Suppose I am creating Project C. i am adding Reference of Project A and B to Project C. So, in Project C, how to identify Project A is Complied through CSCompliler? And Project B is Compiled VBCompiler at Runtime?

1 Answers  


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

0 Answers   NA,


Can two application one using private assembly and other using Shared assembly be stated as a side-by-side executables?

1 Answers  


Which is the root namespace for fundamental types in .net framework?

0 Answers  


what is the use of final method

3 Answers   TCS,


What is connected scenario? : Entity framework

0 Answers  


Is it possible to use multipe inheritance in .net

1 Answers  


Which filter executes first in an asp.net mvc application?

0 Answers  


Can I look at the IL for an assembly

1 Answers  


what do you mean by navigation property?

0 Answers   Microsoft,


How we can call a JavaScript function on the change of a Dropdown List in ASP.Net MVC?

0 Answers  


How we can add the css in mvc?

0 Answers  


Categories