What is role manager work in web.config?
how to restrict perticular pages from the users using the
role manager?
Answer Posted / nisarg 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 ? | 7 Yes | 3 No |
Post New Answer View All Answers
What is the difference between executescalar and executenonquery?
How would you create a permanent cookie?
What is asp.net web pages?
Mention few asp.net validators.
What is an axd file?
How do I create a web form?
What is an asp.net validator? And, mention its types.
What is protected configuration?
What is the exact purpose of http handlers?
What is autopostback true?
Explain how to prepare culture-specific formatting in .net.
Where would you use an ihttpmodule, and what are the limitations if any?
Explain the difference between asp.net mvc and asp.net webforms
What is masterpage?
Explain the asp.net session state modes.