I developed a POC to test the possibility of sharing an authentication cookie between a SharePoint web application and an ASP.NET MVC web application to achieve single sign-on, since there are just a few resources on the web show that this is possible, see http: //labs.3pillarglobal.com/wp-content/uploads/2012/12/Single-Sign-On-White-paper.pdf to see the implementation steps needed to implement them.
My sharePoint web application using claims-based authentication with a forms-based membership provider and AD. The ASP.NET MVC web application also uses forms-based authentication with an active directory membership provider. I am sure that both applications must have the same machine key defined in the web.config file so that cookies encrypted by one application can be decrypted by the other application, as indicated in the Single Sign-On document.
SharePoint web application hosted on localhost: 7070. ASP.NET web application hosted on localhost: 8081 on my local machine.
After implementing this concept on my local computer, as indicated in the document, when I first opened the asp.net mvc web application, it redirected me to the login page, where I provided the user credentials of the active directory and after authentication redirected me to the home page. on this page I have a link to the sharepoint webpage, when I click on this link, I expect the following:
when I clicked the link to the SharePoint web page, the same cookies (generated by the authentication by the ASP.NET MVC application) should be passed to the SharePoint web application. I checked with fiddler - the same cookies are sent to both web applications.
- SharePoint , . . , , - SharePoint cookie.
"System.ArgumentException". Microsoft.SharePoint.Administration.Claims.SPClaimEncodingManager.DecodeClaimFromFormsSuffix(String encodedValue)
, . , - .