Say I have two machines in my internal network running apache:
- web1.mydomain.local
- web2.mydomain.local
Is it possible to share a session cookie between them so logging into an application on web1 and clicking a link to web2 will pass开发者_StackOverflow社区 the session cookie over to authenticate?
Try setting the following within your web.config - this should create your cookie with a ".mydomain.local" domain, accessible from both sub-domains.
<system.web>
<httpCookies domain=".mydomain.local" httpOnlyCookies="true"/>
</system.web>
I believe this should work, but if not, you will have to some amount of session cookie alteration or session management in your code-behind.
精彩评论