IIS 7 and Above
Cookie problem in IIS7 and IE: New session id with every request
Re: Cookie problem in IIS7 and IE: New session id with every request
Sep 30, 2009 07:07 AM|diholaiis|LINK
How is your website set up in web.config, something like this:?
<forms name=".mywebsite" loginUrl="~/Login.aspx" defaultUrl="~/Default.aspx" cookieless="UseCookies" domain="" timeout="60" protection="All" requireSSL="false"/>
Do your sessions timeout setting match the timeout period set in web.config? Do you initialize Session? I found that it needs to be assigned a value otherwise it keeps changing. Have a look in Global.asax:
void Session_Start(object sender, EventArgs e)
// Code that runs when a new session is started
// Store a dummy value. This causes the Session IDs to remain static (otherwise they
// keep changing). This does seem like a messy hack, but suprisingly this is
// exactly what Microsoft recommend doing!
Session["dummy"] = 1;
Session.Timeout = 60;