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 |
please tell me the best book of asp.net in the markit. which explain in simple and detail.
Can I uninstall microsoft .net framework?
What is the use of web api ? Why web api needed, if you have already restful services using wcf ?
Can you write a class without specifying namespace? Which namespace does it belong to by default?
What is work of clr?
What is the difference between adding routes, to a webforms application and to an mvc application?
What is mvc entity framework?
How does work clr?
How do I install .net framework?
If we not suppress finalize method in dispose what will happen?
What is Area in ASP.Net MVC?
When using aspx view engine, to have a consistent look and feel, across all pages of the application, we can make use of asp.net master pages. What is asp.net master pages equivalent, when using razor views?