1 webapplication, which consists of 2 host-named sitecollections:
The webapplication is claim-based - with different authentication mechanisms:
- Form based Authentication
- Windows Authentication
When I log in on abc.domain.com, it creates a FedAuth cookie, by default registered with domain "abc.domain.com". Now, when I try to navigate to xyz.domain.com I have to log in again.
How can I make sure that I don't have to log in again when navigating between those 2 site collections?
I already tried to modify the FedAuth cookie domain to "domain.com". This works but then I have the problem that I can't sign out properly + when the user closes the browser, re-opens it, the user isn't logged in anymore.
FederatedAuthentication.SessionAuthenticationModule.CookieHandler.Domain = "domain.com"; SessionSecurityToken sessionToken = new SessionSecurityToken((IClaimsPrincipal)Thread.CurrentPrincipal); FederatedAuthentication.SessionAuthenticationModule.WriteSessionTokenToCookie(sessionToken);
Any suggestions? Thanks!