I have been using a IHttpModule that performs automatic logon on a forms based authentication using a custom membership provider. This has worked well using any .net asp.net application including SharePoint 2007.
The IHttpModule listens for the AuthorizeRequest event of the application and if the user isn't logged in it uses the
to perform the "login".
When I tried this on SharePoint 2010 using a claims based FBA, adding my custom membership provider as documented, I ran into some problems.
First, the identity name that needed to be set in the SetAuthCookie was not the normal username, it seemed to be on a syntax like
If I used this instead (replacing membershipProviderName and UserName) with the actual ones, the login seemed to work (it felt like a hack tough and perhaps there is some better way to do this?)
After a bit of testing the site the most seemed to work (a plain SharePoint 2010 site), but when I clicked on a list link (like calendar, events or announcements) I was given a servererror as below.
Has anyone any idéas?
Server Error in '/' Application.
<nativehr>0x8107058a</nativehr><nativestack></nativestack>Operation is not valid due to the current state of the object.
View Complete Post