Neil
IIS session timeout is 20 mins by default.
Look for the <sessionState> element in your web.config file and here you can
set the timeout to however minutes you want, e.g.
<system.web>
<sessionState mode="InProc" timeout="40"/>
</system.web>
Also if you re-compile whilst building your App it will ditch your session
(this
was the same in COM/ASP - you had to unload the object in IIS and when you
re-compiled
it re-started the app :-( - let's hope it's something they work towards in
the next
.NET build.)
Phil
-----Original Message-----
From: Neil Newton [mailto:neil_n@h...]
Sent: 12 December 2002 16:38
To: ASPX_Professional
Subject: [aspx_professional] Timeout in Asp.net applications
Hi,
I've coded my first asp.net application and it's working fine. What I
find is that occasionally (usually when I don't type anyting in it for a
while) the pages just simply stop working (you
hit a submit button and nothing happens OR I lose my session variables). I
am assuming that they are "expiring" as I've seen in other professional
applications. Usually in the professional
applications I get a message saying the page has expired.
When I re-start the application again everything is fine. I'm not sure
what I should be addressing. Should I be dealing with expiration and
setting it to a certain timeout value? Someone I work
with suggested that I check a critical session variable; if it's got a
zero length I should redirect the user back to the login page with a
message saying they timed out in the applications.
Any suggestions would be appreciated.
Neil