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 |
In Server how to check whether model has error or not in ASP.Net MVC
What are the advantages of asp.net mvc?
What are the ways to deploy an assembly?
What are the different types of filters, in an asp.net mvc application?
What was the problem in traditional component why side by side execution is supported in .net ?
I have 2+ years of fake experience,actually i could not answer for project questions..?how can i answer please suggest me..?
What is the difference between STA and MTA?
how do you truncate a table using entity data model?
What is the difference between partial and renderpartial?
What is the use of web api ? Why web api needed, if you have already restful services using wcf ?
What you mean by routing in mvc?
What are the advantages of razor view engine?