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 asp.net web application?
Write code to send e-mail from an asp.net application?
What is the difference between a cookie and a pixel?
Is it possible to write code in many languages in one asp.net project?
What is the use of session in web application?
Describe paging in asp.net?
What is ispostback property?
Why do we use asp.net?
How to reduce the width of textbox in editcommandcolumn of datagrid?
What are the types of authentication in asp.net?
To get the values in two different controls to match which control you use it?
can we remote debug applications with the remote debugger installed with vs.net 2002, with vs.net 2003?
What is ashx file in asp.net?
Difference between DataGid and Girdview? Difference b/w .Net 2.0, 3.0 and 3.5 ? Diff b/w dispose & Finialize Methods?
Define authentication and authorization.