Help: Session timeout?

  • Thread starter Thread starter hb
  • Start date Start date
H

hb

Hi,

One section on our web site needs about 3 hours to fill the form since our
users
like to verify some data with other source at that time. But by the time
the user finish filling the form, and click submit button, the session's
gone.
In order to prevent the session gets timeout in short time, I set the
"timeout"
attribute in "sessionState" tag in Web.config file is set to 200(which I
believe is
200 minutes). But users still get session timeout in less than 200 minutes.

Would you please tell me what else affect the timeout and what should I do
to prevent the timeout to happen?

Thank you

hb
 
I wouldn't recommend setting your Session Timeout that high. Depending on
the amount of traffic, you could tie up some serious memory that way. It
sounds like you need to use something other than Session to persist your
data. I don't know how much data you're storing in Session, but alternatives
could be ViewState or database.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Hi, Kevin,

Thank you for the help.

The data that stored in the session id just the user loginID. Since every
page on
that web site verifies that Session variable, the user will be kicked out if
his loginID
session is expired. Since the user get kicked out, the data he spends hours
to input
in the form is lost. That's why we need longer timeout.

HB
 
Well, the user Login ID could easily be persisted in ViewState, and passed
from one page to another, thereby avoiding the use of Session.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
ViewState("KeyName") = KeyValue

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Hi Hb,

From your description, you found the Session State in your ASP.NET web
application will always be timeout no matter who long you've set the
timeout value in the web.config, yes?

As for this problem, I've some further questions to confirm:
1. What kind of session mode are you using? Inprocess, StateServer or
sqlserver?

2. Have you used FormsAuthentication in your application? If so, is it
possbile that it is the FormsAuthenticaiton's authentication cookie timeout
which cause the problem?

Also, I think you can turn on the trace
<%@ Page language="c#" Trace="true" .. >
on those pages which will be navigated through and see the SessionId item
in the cookie collection in the trace reports. If the sessionid does change
after you submit the button, we can confirm that the problem does caused by
the sessionstate which has been timeout after a long time.

Please check out the above items. If you have anything unclear or have any
new findings, please feel free to let me know.



Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
Back
Top