Friday, 26 June 2026     

Login     
 
 Forum Minimize
HomeHomeASP.Net 1.1ASP.Net 1.1GeneralGeneralLost Session Variables (or lose)Lost Session Variables (or lose)
Previous
 
Next
New Post
26/02/2007 11:35 AM
 

I had an issue where I opened a page using the showModalDialog and set a session variable (object) within it, this session variable was lost when the parent page tried to access/use it.

Turns out that when calling the dialog I used the actual server name path as the url, but I was still in the IDE when starting the application, as I was still developing, which was using the localhost as the domain. Since the main pages where using the localhost domain and the dialog (popup) was using the server name in the url the session variables did not seem to keep.

Turns out in the documentation if the domain name of the url for the application changes then the session values will be lost. In real terms each different url has its own session variables, so it appears as though the session variables got lost.

Trick for young players and it had me going for some time. My session values where not sticking even though my session hadn't timed out or changed. I guess in production it would have worked as the the main url would have used the server name.

 

 
Previous
 
Next
HomeHomeASP.Net 1.1ASP.Net 1.1GeneralGeneralLost Session Variables (or lose)Lost Session Variables (or lose)



    
Terms Of Use   Privacy Statement  
Copyright (c) 2026 Apaloon