views:

627

answers:

2

Hi, I have a asp.net website hosted in the dedicated server.I'm using web.config to handle the session timeouts and that is 60 minutes.I did the following settings on the dedicated server (windows server 2003 and IIS 6.0 versions)

  • In the default web site property of IIS-->ASP.net tab-->Edit configuration-->Session timeouts -->60
  • In the application pool The session timeout has been extended to 60.
  • Recycling worker process has been set to 60 in the application pool.

I can get this work correct on my local system the problem is on the dedicated server(Goddady). No customer support is available for this problem It will be also fair if the session timeout is infinity too. But the timeout occurs after every 20 minutes if the webform is kept idle. How to get rid of this? I have a guess that the idle timeout is overriding the session timeout as I googled around but have not found a solution for this

please help me........

Thanks, Prabha

+2  A: 

We had the same problem on a hosted server, and decided that rather than fighting with the hosting company we would use some javascript on a timer to execute an AJAX request to the server to reset the session if it was about to expire.

This site (PreventTimeout) is very close to what we do.

I know this doesn't answer your question directly, but it has been a good workaround for us.

Gary.Ray
Sometimes workarounds are all you have.
SirDemon
A: 

If you recycle the application pool every 60 minutes, then (assuming your sessions die when the pool recycles) a session started 10 minutes before the pool recycles will only last 10 minutes.

On average, you'd expect a session to last 30 minutes.