Configuring Role and Membership Providers:
Essentially everything is configured declaritively using Web.config:
In the above configuration file, note that we first specify our connection strings starting at line 2. LocalSqlServer points to a SQL Server database which has been configured using aspnet_regsql. The second connection string points to the domain controller for membership authentication.
In the authentication section we specify that we are using forms authentication, and provide the URL for our logon page.
In the roleManager section we configure our role provider, pointing back to LocalSqlServer as the role repository.
In the membership section we configure our membership provider pointing back to ADConnectionString (domain controller) specified in the connectionStrings section.
Finally we restrict users from accessing certain folders based on their roles using location sections (role-based security).
No comments:
Post a Comment