Active Directory Membership Provider Integration
In order to use the Active Directory Membership Provider, you need complete the following steps:
- Update ~/config/appSettings.config:
<add key="EnableMembershipIntegration" value="true" />
The key is already defined. You just need to set the value to "true" - In ~/web.config, provide the necessary AD connection information (info taken from http://blogs.msdn.com/b/g...2005/08/17/452905.aspx )
- Add a connection string pointing to the Active Directory store. The following example assumes that your fully-qualified domain name for the domain controller is win2k3.vstsb2.local, while the domain is vstsb2.local. The connection string section in web.config would then look like this:
<connectionStrings>
<add connectionString="LDAP://win2k3.vstsb2.local/CN=Users,DC=vstsb2,DC=local" name="ADConnString"/>
</connectionStrings>
- Then, add the following membership provider info inside system.web (note that this is a very simple implementation, and omits many of the optional attributes):
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
attributeMapUsername="sAMAccountName" <!--sAMAccountName or userPrincipalName-->
connectionStringName="ADConnString"
connectionUsername="vstsb2.local\Administrator"
connectionPassword="password"
enableSearchMethods="true" />
</providers>
</membership>
You should be able to authenticate your user via the AD now.
Another expert info on AD configuration:
http://blogs.msdn.com/b/d...2005/10/11/479941.aspx
ADTester.zip - Download this tester to make sure your AD is set up correctly.
Installation: Download & unzip the files onto your forum's root dir, browse the aspx file and try logging in with the form provided by the tester.
However, if you find it impossible to implement such integration because of the Username / Password requirement, or because you want users to be logged in automatically, here is an alternative method:
Windows Authentication without AD membership provider
post edited by APGvNext (Sam) -