Session Timeout Problem

PWNettle

Well-known member
Joined
Jun 2, 2003
Messages
128
Location
Phoenix, AZ
Howdy,

Im having a problem where my sessions are timing out even though Im using pages that are seemingly involved in the session constantly during the timeout period. Its as if the session is initiated when a page is first hit but then the session is never extended by subsequent page hits...the session will timeout after a certain time period (seems like 20 minutes even with the timeout set higher in web.config)

Whats the trick to getting the session to be extended by subsequent page hits rather than expiring based on the time of the initial page hit?

Why does it seem like setting a (much) higher timeout value in web.config seems to have no effect on session duration?

Any ideas?

Paul
 
Are cookies enabled on your machine?
Are the pages within the same application?
Is session state enabled on those pages in question?
Are you using Forms Authentication?
If/when is the cookie set to expire in your browsers cache?

I hate to throw out basic questions such as those to you Paul but I havent encountered any problems in using session state within ASP.NET, so I can only think of checking the simple things that we all overlook.
 
Oh, Im thinking its something simple and dont mind basic questions.

Im just starting with .Net and kind of jumping into it and hacking around without much of a clue.

We use cookies and sessions in our old fashioned ASPs and I have no problems with them there.

Im using IIS5 on Windows 2000 with all Windows, IE, .Net, etc updates in place.

Are cookies enabled on your machine? Definitely

Are the pages within the same application? Yes

Is session state enabled on those pages in question?
Ive got this in system.web in my web.config file:

Code:
<sessionState 
            mode="InProc"
            cookieless="false" 
            timeout="120" 
    />

Are you using Forms Authentication?
Not sure...being the Dotnoob that I am. In web.configs system.web I have:

<authentication mode="Windows" />

If/when is the cookie set to expire in your browsers cache? Chances are that Ive messed with this in some way...but not sure exactly what/where to check.

Ive searched MSDN and looked at MSDN and Knowledge base online and the only thing I found had to do with background anit-virus software running. Id be happy to read all about setting this up properly myself if such documentation exists in MSDN. I havent been able to find it myself.

Thanks,
Paul
 
We use cookies and sessions in our old fashioned ASPs and I have no problems with them there.
Im taking a huge leap here, but are you trying to read the same session state object from both ASP and ASP.NET pages? This, I assure you, will not work without some doing, but Im inclined to think this still isnt your problem. Im otherwise stumped as to why you cant get sessions working. If you post all the relevant files Id be willing to go over them to make sure they arent the problem.
 
No, we already know we cant use sessions between ASP and .Net.

Im thinking Ill have to do some more reading when time permits on ASP.Net application setup and config. Im sure its something very simple.

Thanks for your input.

Cheers,
Paul
 
Back
Top