SharePoint 2010: Users cannot login to SharePoint site due to mismatch in the Custom Membership Provider value

Article ID: 2653811 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Users cannot login to a forms-based web application in SharePoint that uses a custom membership provider.

CAUSE

One of the following may be the cause:
  • The custom membership/role provider string in the web.config file of the web application and the Claims Authentication Types values of the web application under Central Administration are missing or do not match with one another.
  • The membership provider assembly is missing from the Global Assembly Cache (GAC) or does not match with the web.config. 

RESOLUTION

To identify the mismatch in the custom membership/role provider name from Central Administration:

1. Browse to the Central Administration and under the Application Management section, click on Manage web applications.
2. Select the SharePoint web application configured with the custom membership provider.
3. Click the Authentication Providers link on the ribbon and click on the appropriate zone.
4. Under the Claims Authentication Types section, make a note of the ASP.NET Membership provider and ASP.NET Role manager name. 
5. Open the web.config file for the web application configured with custom membership provider.
6. Under the <Configuration> <system.web> section, look for membership:
    <membership defaultProvider="i">
      <providers>
        <add name="i" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, 
Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
        <add name="ContosoMembership" type="ContosoProviders.Members, ContosoProviders, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=26fc91a86676aa9f" />
      </providers>
    </membership>

7. Make sure the membership name in step 4 and the membership name in step 6 (ContosoMembership) are the same.
8. Search for roleManager section:

    <roleManager enabled="true" cacheRolesInCookie="false" defaultProvider="c">
      <providers>
        <add name="c" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider, Microsoft.SharePoint, 
Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
        <add name="ContosoRole" type="ContosoProviders.Roles, ContosoProviders, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=26fc91a86676aa9f" />
      </providers>
    </roleManager>

9. Make sure the roleManager name in step 4 and the roleManager name in step 8 (ContosoRole) are the same.

For a mismatch in the provider assembly:

1. Open the web.config file for the web application configured with custom membership provider.
2. Under the <Configuration> <system.web> section, look for membership:
    <membership defaultProvider="i">
      <providers>
        <add name="i" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, 
Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
        <add name="ContosoMembership" type="ContosoProviders.Members, ContosoProviders, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=26fc91a86676aa9f" />
      </providers>
    </membership>

3. Record the assembly name from step 2 (ContosoProviders) in the membership provider.
4. Go to C:\Windows\assembly folder on the server and verify that the assembly name from step 3 is in this list and that it is the matching version (1.0.0.0).
5. Search for roleManager section:

    <roleManager enabled="true" cacheRolesInCookie="false" defaultProvider="c">
      <providers>
        <add name="c" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider, Microsoft.SharePoint, 
Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
        <add name="ContosoRole" type="ContosoProviders.Roles, ContosoProviders, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=26fc91a86676aa9f" />
      </providers>
    </roleManager>

6. Record the assembly name from step 5 (ContosoProviders) in the role provider.
7. Go to C:\Windows\assembly folder on the server and verify that the assembly name from step 3 is in this list and that it is the matching version (1.0.0.0).
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2653811 - Last Review: January 20, 2012 - Revision: 4.0
APPLIES TO
  • Microsoft SharePoint Foundation 2010
  • Microsoft SharePoint Server 2010
  • Microsoft SharePoint Server 2010 Service Pack 1
Keywords: 
KB2653811

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com