Ask a Question related to ASP.NET Security, Design and Development.
-
bhatti #1
How do I avoid ASP.NET session timeout from a httphandler?
Hi,
I have a HTTPHandler code that handles file uploads on a ASP.NET
server (IIS 6.0). The code handles large file uploads which can range
from 1K to 500MB. In case of large files, the upload is successful,
but the session times out and we end up taking the user to the login
page.
The machine.config has the following settings:
<httpRuntime maxRequestLength="131072" executionTimeout="36000"/>
and
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" stateNetworkTimeout="10"
sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI"
cookieless="false" timeout="20"/>
All the worker process re-cycle options have been disabled.
Some solutions we have tried out:
- In the Httphandler code, while handling the file upload we check for
the session timeout against the HttpApplication.Session.Timeout and if
the upload time is approaching the session timeout we tried to adjust
the HttpApplication.Session.Timeout value expecting the server code to
extend the session, but that does not occur.
- Have a small js code that pings the server every 5 mins. This seems
to work, but in our specific upload page, we have implemented an
activex control which internally uses WinInet to upload, resulting in
usage of max 2 connections. Thus the js with activex control does not
work for us as js code is not able to open a new connection.
- Increase the session timeout on the config file. After some playing
around and tweaking, we realised that 70% of the users have no issues
if we set it to 30 mins, but around 10% of users regularly transfer
50MB and above, and for these people the timeout is irritating. Due to
the load on the servers the OPS guys do not like extending the timeout
period further.
Any suggestions?
thx in advance
bhatti.
bhatti Guest
-
Session Timeout
Hi, You can control when the session end by using the Session_onEnd event in global.asax. But when the session expired the user won’t make any... -
PHP session timeout
I've modify the php.ini the session.gc_maxlifetime to reduce the time of timeout of the session variabiles. But it not seems to go. In fact the... -
[PHP] Session Timeout
Hi, Saturday, August 30, 2003, 1:55:02 PM, you wrote: SW> From what I see, the default timeout for a session is 1440 seconds or SW> 24 minutes.... -
IIS Session timeout
Is there a way to notify a client browser that their IIS Session is about to OR has just expired? -
How to set session timeout
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.



Reply With Quote

