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.
What is the use of the default route {resource}.axd/{*pathinfo} ?
Can you handle all button click events at once in a form? Give coding.
can we call the garbage collector to run explicicitly?
What are the 3 main components of an asp.net mvc application?
What are scaffold templates in mvc?
What is strong name and which tool is used for this ?
4 Answers Accenture, BirlaSoft,
What are the sub types of ActionResult?
How to make sure Client Validation is enabled in ASP.Net MVC
What is the property available to check if the page posted or not
What is the difference between .net core and .net framework?
About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use ?
6 Answers Infosys, Microsoft, MMTS,