Hi,
we maintain a web app, which handles lot of data using session variables. There is a page A and another page B. both the pages use the data from the same session variables. (I know this is rubbish, but we cant change that). Usually one can open either of the pages but not both. But recently we discovered a scenario that user can open page A, then navigate to page B simultaneously and then navigate back to page A (by posting back). So, earlier when page B is loading, it overrides the session variables with different values, and when page A is loaded on post back, this page is using the session data of page B. Therefore, data is getting mixed up.
It is something like, when page A is opened, press Ctrl+N (open new window) and change the url pointing to page B. Now both the pages pocess same session which is causing the issue.
Another interesting thing found is that instead of Ctrl+N, if a new browser (IE) is opened (not by Ctrl+N this time) when already page A is open, and url of page B is given in the new browser, then even though page B is loaded, this time both page A of browser 1 and page B of browser 2, contain two different sessions altogether, which is what I need.
Now questions is, using Ctrl + N, is there any way to treat this request (sent by page B of new browser by Ctrl+N), as a fresh new request instead of already present request?
I know that when a new request is placed on to server, the server will check for ASP.NET_SessionId cookie value. If nothing is found, then it craetes new session and sends the id so that browser can store in session id and maintain the state. But when I opened new window using Ctrl+N, I want that browser to treat this request as new (i.e. ASP.NET_SessionId is not present). Thereby, the server treats this a new request and creates another session and two different session states are achieved seperately by still using Ctrl+N.
We use base pages (.aspx) and user controls (.ascx). SessionState is "SqlServer".
Any thoughts are appreciated.
jet vedi,
|