What is role manager work in web.config? how to restrict
perticular pages from the users using the role manager?
Answer Posted / alb.shah
Role manager work -
Role management helps you manage authorization,
which enables you to specify the resources that users in
your application are allowed to access. Role management
lets you treat groups of users as a unit by assigning users
to roles such as manager, sales, member, and so on. (In
Windows, you create roles by assigning users to groups such
as Administrators, Power Users, and so on.)
Web.config code to restrict users from accessing some pages
given as below : -
<configuration>
<location path="memberPages">
<system.web>
<authorization>
<allow roles="BUILTIN\Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
<!-- other configuration settings here -->
</configuration>
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Explain the role of global.asax?
How to disable validator control by client side JavaScript?
Mention the execution process for managed code?
If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) In my application?
In which event of page cycle is the viewstate available?
Explain what are webservices?
What can you do with asp.net?
Where do we store our connection string in asp.net application?
What is the behavior of a Web browser when it receives an invalid element?
What are validator? Name the validation controls in asp.net?
What are the advantages of Web API?
What is difference between rest and soap?
How can we register exception filter from the action?
What is meant by asp.net?
Differentiate globalization and localization.