Session being reset when using sub-domain.

Posted by Adam Witko on Stack Overflow See other posts from Stack Overflow or by Adam Witko
Published on 2010-03-08T13:14:52Z Indexed on 2010/03/08 13:21 UTC
Read the original article Hit count: 214

Hi,

I'm trying to use sub-domains in my ASP.NET website but I'm coming across a few problems with the session being reset.

I've edited my hosts file to have 'localhost', 'one.localhost' and 'two.localhost'. I can go to any of these URLs and do what I need to do and login to my system. The session mode is defined as follows in the web.config:

I'm using SQLServer as the website will be ran as a webfarm.

What I'm finding is when I click something that causes a postback all the session is lost and a new session id is created, when this occurs my website is now 'localhost' rather than the logged in 'one.localhost' for example.

Does anyone know what might be causing this?

Cheers

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about sql-server