Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

implementing custom membership provider in sharepoint 2010 I am getting the following error.

I am getting this error in the following page. http://home:55555/_admin/WebApplicationList.aspx?

I copy the member ship code in 3 web.config file. 1. My Current Web Application. 2. Central addministration. 3. Security Token Web service.

<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="CustomFBAMembership" type="CustomMemberShipProvider.Class.CustomMemberShip,CustomMemberShipProvider,  Version=1.0.0.0, Culture=neutral, PublicKeyToken=99f33d5f328d7f5a"/>
      </providers>
    </membership>
    <roleManager defaultProvider="c" enabled="true" cacheRolesInCookie="false">
      <providers>
        <add name="c" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
        <add name="CustomFBARole" type="CustomMemberShipProvider.Class.CustomRoleBase, CustomMemberShipProvider,  Version=1.0.0.0, Culture=neutral, PublicKeyToken=99f33d5f328d7f5a"/>
      </providers>
    </roleManager> 

Error

Exception of type 'System.ArgumentException' was thrown. Parameter name: encodedValue

Troubleshoot issues with Microsoft SharePoint Foundation.

FYI : When I am comment out the all membership and rolemanager tags from the central Administration site web.config then it working fine i think the problem in some where in the membership provider tags.

Please help me out this problem Thanks

share|improve this question
    
If you think your tags are the issue. Then try adding them using IIS. –  Shoban May 30 '11 at 7:06
    
Hi did you ever resolve this issue? I am struggling with kind of the same error. Sander –  user10546 Sep 5 '12 at 21:11
add comment

2 Answers

up vote 3 down vote accepted

I think that the 3 web config will need to be configured differently eg

This for your FBA Site

<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="CustomFBAMembership" type="CustomMemberShipProvider.Class.CustomMemberShip,CustomMemberShipProvider,  Version=1.0.0.0, Culture=neutral, PublicKeyToken=99f33d5f328d7f5a"/>
  </providers>
</membership>
<roleManager defaultProvider="c" enabled="true" cacheRolesInCookie="false">
  <providers>
    <add name="c" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
    <add name="CustomFBARole" type="CustomMemberShipProvider.Class.CustomRoleBase, CustomMemberShipProvider,  Version=1.0.0.0, Culture=neutral, PublicKeyToken=99f33d5f328d7f5a"/>
  </providers>
</roleManager> 

This for the token and central admin

    <membership defaultProvider="i">
  <providers>
    <add name="CustomFBAMembership" type="CustomMemberShipProvider.Class.CustomMemberShip,CustomMemberShipProvider,  Version=1.0.0.0, Culture=neutral, PublicKeyToken=99f33d5f328d7f5a"/>
  </providers>
</membership>
<roleManager>
  <providers>
    <add name="CustomFBARole" type="CustomMemberShipProvider.Class.CustomRoleBase, CustomMemberShipProvider,  Version=1.0.0.0, Culture=neutral, PublicKeyToken=99f33d5f328d7f5a"/>
  </providers>
</roleManager>
share|improve this answer
add comment

Try to debug your code. It is likely in issue with your custom membership provider, since it works when you remove it from the web.config. When it is added to the web.config your membership provider is initialised. Also check the ULS log for a stack trace, which likely will pin down your problem.

share|improve this answer
    
can you please provide me some good links so i can Implement the Custom Membership provider on my site. –  Basant B. Pandey May 30 '11 at 6:36
    
when I remove the role Provider from my Central Administration Site. Then I try to check the custom provider. It works for me. But my question is this why RoleProvider not working in SharePoint 2010? –  Basant B. Pandey May 30 '11 at 7:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.