authentication - ASP.NET Identity cookie and subdomains -
i'm trying share asp.net identity cookie across subdomains. locally.
- sub1.domain.local
- sub2.domain.local
i have same machine key on both sites, cookie created on sub1 not validate on sub2 , vice versa. resulting cookie domain ".domain.local" (which should correct??)
this setup in startup class:
app.usecookieauthentication(new cookieauthenticationoptions { authenticationtype = defaultauthenticationtypes.applicationcookie, loginpath = new pathstring("/login"), cookiedomain = ".domain.local", });
i've tried on localhost:siteport each site, same result (cookie domain blank, resolving "localhost")
i can't life of me figure out i'm doing wrong. maybe can point me in right direction? thanks
update
okay, i've figured out cookie in fact shared between subdomains, it's considered valid on subdomain created cookie. need find way know why authentication fails on other site..
after lot of headscratching noticed difference in version numbers in various identity packages. updated various packages nuget, , wouldn't know. worked!
what worries me updated minor versions (e.g. microsoft.owin.security.cookies 3.0.0.0 3.0.1.0). don't hope have stay aligned in future..
Comments
Post a Comment