Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > .NET Framework 1.x
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 20th, 2006, 08:41 AM
Friend of Wrox
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default Session Variables Randomly Disappeared


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.

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&" +
            "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)

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.

Old November 30th, 2006, 01:24 AM
Registered User
Join Date: Mar 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to vinodhanandhan

you change customErrors tag in web.config file.

<customErrors mode="Off"/>

i hope it will work properly.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Variables Randomly Disappear? Ron Howerton VS.NET 2002/2003 106 July 26th, 2012 02:16 PM
Session Variables in C# shikha09 C# 1 November 28th, 2006 10:38 AM
Session Variables Randomly Disappeared Dmitriy General .NET 0 November 20th, 2006 08:42 AM
Session Variables testsubject Visual Studio 2005 8 March 8th, 2006 04:26 PM
session variables help face Classic ASP Databases 4 September 12th, 2003 03:57 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.