Authentication samples
Applies To: Office SharePoint Server 2007
This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.
Topic Last Modified: 2016-11-14
In this article:
SQL membership provider
Active Directory membership provider
LDAP membership provider
Web SSO with AD FS
This article includes sample configuration settings for several common forms authentication and Web single sign-on (SSO) authentication providers.
SQL membership provider
The following table provides examples of Web.config file entries for using ASP.NET forms authentication to connect to a SQL membership provider.
Configuration steps | Description and example Web.config file entries |
---|---|
Turn on ASP.NET forms authentication. |
You can set the authentication type for a particular zone to forms authentication on the Edit Authentication page on the SharePoint Central Administration Web site. This automatically changes the mode specified in the authentication element of the Web.config file for that zone to forms. For example:
|
Register the membership provider. |
If you are using Microsoft SQL Server database software on the local server as your membership provider database, and you specify AspNetSqlMembershipProvider for the membership provider name, you might not need to make any additional changes to the Web.config file. In this scenario, if the machine.config file has the correct configuration for the AspNetSqlMembershipProvider, you can use it for Windows SharePoint Services without making any changes. If the default configuration in the machine.config file does not apply (for example, if you want to use a SQL Server database on a remote server), you must edit the Web.config files for both the Web application and the Central Administration Web site to specify the connection information in the For example:
Replace SQLSERVERMACHINE with the name of server computer on which you have installed the SQL Server membership database. Next, add the For example:
The |
Register the role manager (optional). |
You can use the default role provider for ASP.NET by adding a
The preceding syntax uses the AspNetSqlRoleProvider, which is defined in the machine.config file. This role manager can connect to the ASPNETDB database in either the local or remote instance of SQL Server. If you want to use a SQL Server database on a remote server as your role provider database, you must edit the Web.config file to specify the connection information for the remote database server. For example:
Replace SQLSERVERMACHINE with the name of the remote server that hosts the SQL database. You can specify the same Next, you need to add the For example:
The |
Register the HTTP module. |
Not applicable |
Active Directory membership provider
The following table provides examples of Web.config file entries for using ASP.NET forms authentication to use an Active Directory directory service membership provider.
Note
This will only work in a scenario with a single domain.
Configuration steps | Description and example Web.config file entries |
---|---|
Turn on ASP.NET forms authentication. |
You can set the authentication type for a particular zone to forms authentication on the Edit Authentication page in Central Administration. This automatically changes the mode specified in the authentication element of the Web.config file for that zone to forms. For example:
You can also specify the login page URL in the forms element, for example:
|
Register the membership provider. |
If you want to use an Active Directory server for a membership provider, you must edit the Web.config file to register the membership provider. To do this, you must specify the connection information to the Active Directory server in the For example:
Replace DirectoryServer with the name of membership directory server.
Note The preceding example does not specify account credentials. If you do not specify account credentials, your application's process identity is used to access Active Directory. If another account is required to access Active Directory, you can specify different account credentials in the
|
Register the role manager (optional). |
|
Register the HTTP module. |
Not applicable |
LDAP membership provider
The following table provides examples of Web.config file entries for using ASP.NET forms authentication with a Lightweight Directory Access Protocol (LDAP) membership provider.
Configuration steps | Description and example Web.config file entries |
---|---|
Turn on ASP.NET forms authentication. |
You can set the authentication type for a particular zone to forms authentication from the Edit Authentication page in Central Administration. This automatically changes the mode specified in the authentication element of the Web.config file for that zone to forms.
|
Register the membership provider. |
The
You will need to change the values specified for the |
Register the role manager (optional). |
You will need to change the values specified for the |
Register the HTTP module. |
Not applicable |
Web SSO with AD FS
The Microsoft Windows Server 2003 R2 operating system introduces Active Directory Federation Services (AD FS), which enables organizations to securely share a user's identity information. AD FS provides Web single sign-on (SSO) technologies to authenticate a user to multiple Web applications during a single online session.
The following two membership and role provider pairs are included with AD FS:
SingleSignOnMembershipProvider/SingleSignOnRoleProvider The standard membership provider and role provider included with Windows Server 2003 R2.
SingleSignOnMembershipProvider2/SingleSignOnRoleProvider2 The membership provider and role provider that operate in partial trust environments. These providers are included in Service Pack 2 of Windows Server 2003 R2.
SingleSignOnMembershipProvider/SingleSignOnRoleProvider
The following table provides examples of Web.config file entries for a Web SSO AD FS environment that uses the standard provider.
Configuration steps | Description and example Web.config file entries |
---|---|
Turn on ASP.NET forms authentication. |
|
Register the membership provider. |
For the The |
Register the role manager (optional). |
For the |
Register the HTTP module. |
|
SingleSignOnMembershipProvider2/SingleSignOnRoleProvider2
If you are implementing the second AD FS provider set, the settings for registering the membership provider and role manager are different. The following table provides examples of Web.config file entries for a Web SSO AD FS environment that uses the provider that operates in partial trust environments.
Configuration steps | Description and example Web.config file entries |
---|---|
Turn on ASP.NET forms authentication. |
|
Register the membership provider. |
For the The |
Register the role manager (optional). |
For the |
Register the HTTP module. |
|
Download this book
This topic is included in the following downloadable book for easier reading and printing:
See the full list of available books at Downloadable content for Office SharePoint Server 2007.