2
votes

Is it possible to share Session state between web applications on separate servers? One of the web sites is using session state to maintain user credentials/info session state, the other is using forms authentication to maintain this information. Without modifications to the website using session storage, is it possible for the website using forms auth to read/access the session state on the other server? If not, which I assume is the answer, would it be possible if they ran on the same server? (i.e. the same app pool)?

Note: Both applications are under the same domain name (one of them will be a sub-domain)

As a note, the reason this is being asked is because a client is requesting a "single sign-on" approach between two websites. We're using forms authentication and the other site (which we cannot modify at this moment) is maintaining credentials/logon information in session

ASP.NET 4 IIS 7.5

1

1 Answers

0
votes

Assuming the latter, you could try something like this:

first, make sure all the appliations are running in the same domain. If not, all bets are off. I don't know if there's a simple way to configure the domain property of the session cookie yet, so you may have to do it yourself, by setting the cookie domain property to the domain:

Response.Cookies["ASP.NET_SessionId"].Domain = ".mydomain.com";

you'll need to make sure that each application is configured to use either a common state server, or a db-backed session.

please follow the link : How to share session state across subdomains