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 |
How to make sure Client Validation is enabled in ASP.Net MVC
What are the features that are new in .net 2.0
What is managed extensibility framework?
what is Assemble
how can you enhance the performance of entity framework?
What is the CLR
How does assembly versioning work?
How to use Jquery Plugins in ASP.Net MVC validation?
Explain what is the difference between view and partial view?
explain what does .edmx file contains?
Briefly describe the roles of clr in .net framework?
What is NonActionAttribute ?