1
votes

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 to 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?

1
Have you tried using the Visual Studio debugger to step through the membership provider code to see where it's bombing?CodeThug
@kbrim Line 22 is just the definition of my membership provider, which I believe works fine, as I have used the exact same line in other web apps without issue. @Tim Yes, I attached the debugger to all w3svc processes, and got nothingDavid Wengier

1 Answers

0
votes

Have you entered a <SafeControl> entry for the Membership provider?