Forum Moderators: open

Message Too Old, No Replies

Keeping Sessions from timing out

Shouldn't 180 be enough?

         

garann

6:36 pm on May 16, 2003 (gmt 0)

10+ Year Member



Hi,

My Session variables seem to be timing out awfully quickly (like 5-10 minutes, or if I hit Refresh repeatedly). I'm using ASP.NET on IIS. In my web-config file, I have the session set to expire at 180 (this is minutes, right?), but it doesn't seem to make a difference.

I've been told that unhandled exceptions may cause a server to drop the session, but I'm having the same problem even when my error log is empty. Are there any other reasons the session would expire, or any other places to set the expiration?

TIA,
g.

chris_f

12:54 pm on May 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Garann,

this is minutes, right?

Yep! :)

It could be using the servers default session timeout instead of you one.

In my web-config file, I have the session set

Try setting it in the global.asa. This will override the servers default.

Chris

Xoc

6:07 am on May 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you run out of resources on the server, IIS will probably start reclaiming memory by killing sessions early. If you have a memory leak, or no enough memory, on the server that could do it.

garann

4:11 pm on May 21, 2003 (gmt 0)

10+ Year Member



Chris,

Can you tell me a little more about the global.asa file? Is this something that should reside in my virtual directory, or is it a file used by the whole server? I have a global.asax file, but no .asa. If I'm missing the point and there's no difference between the two, do I set that programatically (Session.Timeout = 180)?

Thanks,
g.