Andry Shechter


I have a new session id almost every time when clicking on the hyperlink on the page. The link leads to the page in the same domain (even in the same folder), no new window/tab is opened. Session refreshed (some values are inserted) on every page_load, and timeout is not considered as it takes me just a few seconds to reproduce the bug.

I suspect the problem is in IE7 security settiings which make the session cookie to expire. When using the FireFox browser, the bug is not observed.

However, I have "1A03" registry value ( set everywhere to allow cookies (0). Privacy in IE set to "Always allow session cookies", all cookies accepted. Site in the trusted list.

I'm experiencing this problem both locally and on the server.

Any ideas

Re: Internet Explorer Web Development Session restarts when navigating from one page to another in IE7

Andry Shechter

Well, I've found the workaround for the problem.

On every request I save the current session id in the permanent cookie file with the system name ("ASP.NET_SessionId") and set it to timeout together with the session:

Code Snippet

Dim SessionCookie As New HttpCookie("ASP.NET_SessionId", Session.SessionID)

SessionCookie.Expires = DateAdd(DateInterval.Minute, Session.Timeout, Now)