Losing Session ID
-
Sometimes some of my session ids loose their values when navigating from page to page on my an ASP .Net site causing errors. This happens when using Microsoft IE. When I run it in Foxfire this does not happen. What could be the problem?
FoxFire??:confused: Browsers dont have anything to do with missing session variables. Session variables are stored in the web server and the browser does not have any control over their lifetime or value. 1. Check your code to see if the session variables are being reset anywhere you dont want them to be 2. The default session duration in IIS is 20 minutes. If you're in a page longer than that, doing nothing, then that session is considered as "closed" Regards, SG
-
FoxFire??:confused: Browsers dont have anything to do with missing session variables. Session variables are stored in the web server and the browser does not have any control over their lifetime or value. 1. Check your code to see if the session variables are being reset anywhere you dont want them to be 2. The default session duration in IIS is 20 minutes. If you're in a page longer than that, doing nothing, then that session is considered as "closed" Regards, SG
I think it depends on what kind of session storage is being used: passing the session ID through the URL or using cookies. I want to say the cookie method is default. I have some session variables declared with everything at default. When I open up the developer toolbar in IE 6, I can clear the session cookies. That will effectively grind my application to a halt on the next postback. I can't find where the hell this session ID is so I can't say without a doubt that's what is going on.
-
I think it depends on what kind of session storage is being used: passing the session ID through the URL or using cookies. I want to say the cookie method is default. I have some session variables declared with everything at default. When I open up the developer toolbar in IE 6, I can clear the session cookies. That will effectively grind my application to a halt on the next postback. I can't find where the hell this session ID is so I can't say without a doubt that's what is going on.
This is correct with .Net session ID's are now stored in cookies and they are somewhat encrypted which is why you can't find them. In ASP they were server side but that can create a load. You can change where the session ID's are stored and if you have a small audience I would say do it server side. Hope this helps.
-
This is correct with .Net session ID's are now stored in cookies and they are somewhat encrypted which is why you can't find them. In ASP they were server side but that can create a load. You can change where the session ID's are stored and if you have a small audience I would say do it server side. Hope this helps.
-
How do you change where the session ID's are stored? I would like to store them server side. On the page I'm having trouble there are about 12 session id's.
Here you go: The magic is in the web.config: (modify accordingly) From my assumptions of your code and question, I am assuming .Net1.1 and you are not using a state farm or SQL for session management so select: mode=InProc andn cookieless=true Here are more resources: MSDN Link: http://msdn2.microsoft.com/en-us/library/h6bb9cz9(VS.71).aspx session FAQ: http://www.eggheadcafe.com/articles/20021016.asp cookiesless session problems: http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=401 ~We are the gifted few to have such awesome jobs! :)