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 odata in web api?
What are the differences between primary foreign and unique keys?
Describe the events in the life cycle of a web application.
How many types of server controls do we have?Also explain differance between them taking an example of ASP.NET?
What is Bundling and Minification in MVC?
What are themes and skins in 2.0, explain usage scenario?
What is the use of the tag in the web.config file?
What is http protocol and how it works?
What is the difference between a multi-layer and multi-tier applications?
how to write html code with ssl
What are the versions of garbage collection?
Define tracing.
what are the security certificates used in webservices?
How long the items in ViewState exists?
What is in a session cookie?