Problem with custom MembershipProvider in SharePoint 2010
I'm having a problem getting a custom membership provider to work in SharePoint. The login page is displayed, but when I enter any credentials - right or wrong - I get the following error:
The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\Root\web.config line 22)
Line 22 is where my membership provider is configured. Its also configured in the root web sites web.config (since it needs t开发者_StackOverflow中文版o be configured in every virtual directory). If I remove line 22, I get the error complaining about the provider not being in every web.config, so that part seems to be working.
On the same web server, I have set up a default MVC project and confirmed that the membership provider works fine. I know sharepoint is loading it at least partially, because if I make it throw an exception in the constructor, I get a different error (Exception thrown by the invocation etc.), and the login form isn't even displayed.
The DLL is built as AnyCPU, against .NET Framework 3.5, and is in the GAC. The server is running Windows 2008 R2, 64-bit.
Can anyone point me in a direction to try?
Have you entered a <SafeControl>
entry for the Membership provider?
精彩评论