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’s the advantage of using System.Text.StringBuilder over System.String?
What data type should you use if you want an 8-bit value that's signed ?
What is html.renderpartial?
What is shared and private assembly ?
3 Answers Accenture, BirlaSoft,
How does servicing work for the .net framework 3.0?
What are the types of assemblies
What is the benefit of entity framework?
What is .net framework in simple terms?
What platforms does the .NET Framework run on?
What is work of clr?
What does CLR do after the IL is generated and machine language is generated .Will it look for main method ?
What are Code Blocks in Views?