SharePoint Form Authentication using LDAP


First we need to configure the Authentication Provider to use Forms Based Authentication. This is done via SharePoint Central Administration.
  1. Browse to SharePoint Central Administration

  2. Select the Application Management tab

  3. Under the Application Security section select Authentication Providers

    1.gif

  4. Select the appropriate Web Application which you want to allow Forms based Authentication.

    2.gif

  5. After selecting web application from the drop down .Click the appropriate, only Default as shown above.

  6. Scroll down to the Authentication Type section and change the Authentication Type to Forms

    3.gif

  7. Scroll down to Membership Provide Name and enter the name of your Membership provider, this must match the name in your web.config (see below).

    4.gif

  8. You can leave Role Manager as blank

  9. Select Client Integration as NO
Update SharePoint Central Admin web.config

Please note that updating the web.config incorrectly can damage your SharePoint installation. Extreme care should be taken, please do not edit the web.config if you are not familiar with web.config or XML structures.
  1. Make a backup of the web.config file (always a best practice).

  2. Locate your web.config file for the SharePoint Central Administration website. Normally located in C:\Inetpub\wwwroot\wss\VirtualDirectories

  3. Take special care to select the right Virtual Directory, mine is named SharePointCA80 yours will be different

  4. Locate the web.config file and open it with notepad

  5. Scroll down to the configuration node, <configuration> find <connectionStrings>

    <connectionStrings>
    <add name=" LDAPMConnectionString" connectionString="<a 
    href="ldap://Your domain name.local/CN=Users,DC=???,DC=local">
    LDAP://Your Domain name.local/CN=Users,DC=Your Domain Name,DC=local</a>" />
    </connectionStrings>


  6. Scroll down to the system web <system.web> node and the following membership

    <membership defaultProvider=" LDAPMembershipProvider ">
    <providers>
    <add name=" LDAPMembershipProvider "
    type="System.Web.Security.ActiveDirectoryMembershipProvider,System.Web,
    Version=2.0.0.0,
    Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" 
    connectionStringName=" LDAPMConnectionString "connectionUsername="User ID" 
    connectionPassword="****"enableSearchMethods="true"
    attributeMapUsername="Admin "/>
    </providers>
    </membership>


  7. Save and close the web.config for SharePoint Central Administration 

  8. Update the web.config of SharePoint Web application 

  9. Repeat steps 1 to 8 for the web.config of the SharePoint web application you configured the Authentication Provider for Forms Based Authentication above

  10. Check the authentication in this web.config is set to the following.

    <authentication mode="Forms">
    <forms loginUrl="/_layouts/login.aspx"></forms>
    </authentication>

Up Next
    Ebook Download
    View all
    Learn
    View all