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


Please Help Members By Posting Answers For Below Questions

Explain how is a property designated as read-only?

549


What is the use of the tag in the web.config file?

569


Explain how can we inherit a static variable?

522


Where web.config file is used?

569


What is asp.net and how it works?

513






What are session state modes? List some of the important session state modes of asp.net.

533


Why do I get error message "could not load type" whenever I browse to my asp.net web site?

629


Where is the session stored?

633


How is it possible for .NET to support many languages?

302


Define cookie.

564


How do I know asp.net mvc version? : Asp.Net MVC

498


In a webservice, need to display 10 rows from a table. Which is the best choice among datareader or dataset?

649


What is the difference between session and viewstate?

513


Explain why it is useful to use mvc instead of webforms? : asp.net mvc

595


Are xaml file compiled or built on runtime?

553