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
Explain how is a property designated as read-only?
What is the use of the tag in the web.config file?
Explain how can we inherit a static variable?
Where web.config file is used?
What is asp.net and how it works?
What are session state modes? List some of the important session state modes of asp.net.
Why do I get error message "could not load type" whenever I browse to my asp.net web site?
Where is the session stored?
How is it possible for .NET to support many languages?
Define cookie.
How do I know asp.net mvc version? : Asp.Net MVC
In a webservice, need to display 10 rows from a table. Which is the best choice among datareader or dataset?
What is the difference between session and viewstate?
Explain why it is useful to use mvc instead of webforms? : asp.net mvc
Are xaml file compiled or built on runtime?