Roles provide a convenient way to manage user group access rules. After creating users, you can assign them to roles (in Windows, users are assigned to groups ). For example, you can create a group of pages and restrict their access permissions to some specific users and store these pages in folders. Then, you can use IIS 7.0 to define rules that allow and deny access to the restricted folder. If an unauthorized user attempts to view a restricted page, the user will see an error message or be redirected to the page you specified.
Note: anonymous users accessing websites, applications, or files cannot assign roles.
(1) Add a. NET role
1. Open the IIS manager and navigate to the level to be managed.
2. In "function View", double-click ". NET role ".
3. In the actions pane, click Add ".
4. In the "name" text box in the "Add. NET role" dialog box, type the role name and click "OK ".
(2) disable the. NET role
If you no longer need to apply security settings to a specific user group, you can disable the corresponding role.
1. Open the IIS manager and navigate to the level to be managed.
2. In "function View", double-click ". NET role ".
3. In the actions pane, click Disable ".
(3) Enable the. NET role
To easily group users and apply security settings to user groups, you can enable roles.
1. Open the IIS manager and navigate to the level to be managed.
2. In "function View", double-click ". NET role ".
3. In the actions pane, click Enable ".
(4) Deleting A. NET role
If you no longer need to apply security settings for a specific group, you can delete these roles.
1. Open the IIS manager and navigate to the level to be managed.
2. In "function View", double-click ". NET role ".
3. Select the role to delete.
4. In the actions pane, click Delete ".
(5) Rename the. NET role
1. Open the IIS manager and navigate to the level to be managed.
2. In "function View", double-click ". NET role ".
3. Select the role to be renamed.
4. In the actions pane, click rename ".
(6) Select the default provider for the. NET role
IIS 7.0 includes the following default providers for roles:
-SQL Server (AspNetSqlRoleProvider)-role information is stored in the SQL Server database. The SQL provider is applicable to large and medium-sized Internet applications. This is the default provider.
-Windows (aspnetwindow#enroleprovider)-role information is based on Windows accounts (users and groups ). Windows providers are useful only when applications run on networks where all users have domain accounts.
1. Open the IIS manager and navigate to the level to be managed.
2. In "function View", double-click ". NET role ".
3. In the actions pane, click Set Default provider ".
4. In the "Edit. NET role Settings" dialog box, select a provider from the "Default provider" drop-down list and click "OK ".
(7) view. NET Role users
To understand the. NET users associated with a specific role, you need to view the users.
1. Open the IIS manager and navigate to the level to be managed.
2. In "function View", double-click ". NET role ".
3. Select the role to view its user list.
4. In the actions pane, click View user ".