B
bhatti
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.
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.