How do you do role based security ?
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 |
What are scaffold templates in mvc?
What is a serverside technology? what is a clientside technology? what is a clientserver technology? what is a internet based application? what is a intranet based application? what is a windows application? what is a console application? Difference between console application and windows application?
If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?
What is the use .Glimpse in ASP.Net MVC
What is GUID and why we need to use it and in what condition? How this is created
What is partialview in asp.net mvc?
What is the full form of sp?
Explain encapsulation
1 Answers HPCL, Hughes Systique Corporation,
What are the levels at which filters can be applied in an asp.net mvc application?
What are the two ways to add constraints to a route?
What you mean by routing in asp.net mvc?
what is deferred loading(lazy loading)?