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
What are the session variables?
What are httphandlers and httpmodules and difference between them?
What is the application pool?
What do you mean by caching in asp.net?
What are the main differences between asp and asp.net?
When cookie will expire?
What is redirectpermanent in asp.net?
What is the difference between custom controls and user controls?
What are demand-paging and pre-paging?
how to retrieve property settings from xml .config file.
Where is the view state data stored?
What is active web page?
What are directives in asp.net?
Describe Segmentation With Paging?
Explain what is event bubbling?