Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Using ASP .NET Membership Welcome Administrator! Welcome Average User! If you request the page in Listing 27.31 after enabling the WindowsTokenRoleProvider, you see the content displayed by the LoginView control only when you are a member of the Windows Administrators group. Configuring the AuthorizationStoreRoleProvider Authorization Manager (AzMan) is a component of Windows Server 2003 and Windows Server 2008. You can use Authorization Manager to define roles, tasks, and operations. Authorization Manager supports more features than the authorization framework included in ASP.NET Framework. For example, Authorization Manager supports role inheritance, which enables you to. | 1254 CHAPTER 27 Using ASf.NET Membership ContentTemplate h1 Welcome Administrator h1 ContentTemplate asp RoleGroup RoleGroups LoggedInTemplate h1 Welcome Average User h1 LoggedInTemplate asp LoginView div form body html If you request the page in Listing 27.31 after enabling the WindowsTokenRoleProvider you see the content displayed by the LoginView control only when you are a member of the Windows Administrators group. Configuring the AuthorizationStoreRoleProvider Authorization Manager AzMan is a component of Windows Server 2003 and Windows Server 2008. You can use Authorization Manager to define roles tasks and operations. Authorization Manager supports more features than the authorization framework included in ASP.NET Framework. For example Authorization Manager supports role inheritance which enables you to easily define new roles based on existing roles. Authorization Manager can store role information in three different ways. You can create an authorization store by using an XML file by using Active Directory or by using Active Directory Lightweight Directory Services AD LDS . Before you use Authorization Manager with the ASP.NET Framework you need to create an authorization store. Role information is stored in an XML file local to the application. Follow these steps 1. Launch Authorization Manager by executing the command AzMan.msc from a command prompt see Figure 27.15 . 2. Switch Authorization Manager into Developer mode by selecting Action Options and selecting Developer mode. 3. Open the New Authorization Store dialog box by selecting Action New Authorization Store. 4. Select the XML file option and enter the path to your application s App_Data folder for the Store Name field. For example c Websites MyWebsite App_Data WebRoles.xml From the Library of Wow eBook Using the Role Manager 1255 FIGURE 27.15 Using Authorization Manager. 5. Create a new Authorization Manager application by right-clicking the name of your authorization store and selecting New .