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 |
Can I customise the serialization process
How to set the debug mode
What are Scaffold templates in ASP.Net MVC?
If you change something in web.config file.Do u need to compile again?
5 Answers Broadridge, SMNetserv,
If Controller is not there in MVC Pattern what happens?
What is Attribute Routing in ASP.Net MVC?
What is serialization ?
What is Globalizationa and Localization
What is serialization in .NET? What are the ways to control serialization?
Why to use html.partial in mvc?
what is entity sql?
Features in .net framework 1.1 ?