Session Variables Randomly Disappeared
Hi,
I am having the "random Session disappearance" problem in my ASP.NET application. Why random? Most of the time the application working as it supposes to be, but occasionally, the Session variable start setting to Nothing by some reason when I am redirecting from one page to another from inside the Java script on the previous page.
Example:
This is the Java script on the page A.ASPX:
function DoSomeWork(numMapX,numMapY) {
//debugger //TO DO the DEBUGGING
var sURL;
sURL = "B.aspx?"+
"action=Identify&" +
"X="+numMapX.toString()+"&"+
"Y="+numMapY.toString()+ "&"+
"activeLayer=" + document.Form1.activelayer.value+"&"+
"width="+ (maxx-minx);
objWin = window.open(sURL, "Identify", "height=430,width=890,scrollbars=yes,resizeable=ye s");
if (parseInt(navigator.appVersion) >=4)
objWin.window.focus();
}
As you can see, I am calling the page B.ASPX from the page A.ASPX to open in separate window and do some work. I am creating the Session variable inside the page A.ASPX and using same variable inside the page B.ASPX. Like I've mentioned before, most of the time it works fine, but from time to time it start giving me this "random Session disappearance" problem.
What is interesting, if I am running the application (which is located on the server PC) from my browser, or if I am running the application code from my developer's PC, I have this problem till I reboot my PC.
After that the problem magically disappeared and I can run the application normally (from the server and from my local machine)!?
What is going on? Any suggestions will be appreciated.
-Dmitriy
|