1

I am using asp.net webmethod for jquery ajax asynchronous call for very lengthy process. I am using session variable to store object, so I have set EnableSession = true in the webservice's webmethod declaration.

But problem is that after setting session to true it blocks further any action like postback, until the long process get finished, user isn't able to logout or postback or open another aspx page. So how we can get out this problem, pls help anybody know this issue.

JotaBe
  • 38,030
  • 8
  • 98
  • 117
arup
  • 41
  • 6

1 Answers1

1

The problem is that the Session object is locked, and any request that uses it will be locked, until your long running process releases it.

Look at this SO Q&A: Is it possible to force request concurrency when using ASP.NET sessions?

You habve to change the desing of your long-running process so that it doesn't depend on Session. For example, store the required session data somewhere else (for example in a DB) and let the long process read the data from the alternative store.

Community
  • 1
  • 1
JotaBe
  • 38,030
  • 8
  • 98
  • 117