2

I have a application where I will upload some data to the database since the uploading time taken is large and to allow user to work on the other part of the application when the upload is in progress I am trying to upload asynchronously using PageAsyncTask or AsyncCallback methods. But with this I am having a problem with session timeout. Say my session timeout is set to 20 min, I start the upload asynchronously and the user does not do any operation on the application, hence after 20 min the page gets timed out, but since the upload is async it continues. I would want to keep the session alive until the upload is complete.

I was not able to use timer in the page as the user can navigate form the page and the time would stop. Is there any way I can prevent the session getting timed out, any advice would be helpful.I Thanks

AndroidLearner
  • 4,500
  • 4
  • 31
  • 62
ARV
  • 1,111
  • 5
  • 22
  • 46
  • which session state mode are you using? if you use Inproc, this is normal. – Ashwini Verma Dec 17 '12 at 11:19
  • you should use StateServer or SQLServer session state mode. http://stackoverflow.com/questions/9971309/session-timeout-on-server-side-in-asp-net-c-sharp/9971776#9971776 – Ashwini Verma Dec 17 '12 at 11:25
  • I am using Inproc, since the whole application is using this will not be able to change to StareServer or SQLServer now, will have to find if i am still able to maintain session with this. – ARV Dec 17 '12 at 12:14
  • Since Inproc, I assume while uploading, worker process is getting recycled and causing session lost. In my case I had no choice switching Inproc to StateServer. However, you can try these steps to Troubleshooting InProc Session Loss.. http://blogs.msdn.com/b/webtopics/archive/2009/07/22/in-proc-session-state-management.aspx – Ashwini Verma Dec 17 '12 at 13:13
  • The session timeout occurring is correct as it occurs at the set time of 20 min there is no session recycle occuring, my problem is to extend that time out util the async upload process is completed. – ARV Dec 17 '12 at 14:13
  • 1
    oh! in this case then try this solution: http://weblogs.asp.net/stevewellens/archive/2009/06/09/ah-ah-ah-ah-staying-alive-staying-alive.aspx – Ashwini Verma Dec 17 '12 at 14:59

0 Answers0