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 |
I want to fetch data from datareader. i have three tables in datareader. i want to bind my two table with datagrid, then i want to fetch a value from my third table. do u have any idea pls help me. we use dr.nextresult() for multiple tables.
What are the main features of asp.net mvc 4 used by asp.net web api?
Can a nested object be used in Serialization
How to answer for project questions..?
What is latest version of .net framework?
What's an interface
How to make sure Client Validation is enabled in ASP.Net MVC
Explain peek method in tempdata in asp.net mvc?
Can I set the unlimited length for "maxjsonlength" property in config?
Explain what is routing?
What is side by side Execution ?
What are the 2 ways of adding constraints to a route?