Asp.net 4.0 - web farm / session / long running tasks

My questions are two times -

We have an asp.net Webforms website that allows users to authenticate to sites like Facebook, Google, etc., and after authenticating, users are redirected back to our site and do some processing on some data which may take several minutes, Long running tasks are run in separate threads and users are shown progress through Ajax calls.

So far, he was using an InProc session on the same server and everything worked fine. Now we go to the web farm and have to move the session to a non-working model and my first question. What is the recommended way to store session from proc? Or do I not need to use a session at all and use something like memcached to store user generated data that is only valid for that user session? What offers more scalability and performance?

In a web farm environment, since subsequent requests can be served on any of the servers, how do you deal with long term challenges? Ex. a task can be started by one server and the next request from the same client / session can come to another server in the farm. In the single server + InProc model, we used ManualResetEvent to wait (or timeout) and respond to the client when the process is complete. Should we just be looking for some kind of shared object to be set to cache / session?

Thanks for the advice / help.

+3


source to share





All Articles