I think this is a recurring question but I couldn't find an specific answer to my doubt.
I have a Asp.net MVC3 application, we are going to switch to AsyncController to improve the app and I think all the setup is done right. However, this app will run in load balancer with one central session state server. Asp.net State Service.
The request to need to read from session, so with hundreds parallel requests from many users will requests end up queuing up due to session object serialization back and forth to the state server? Or worst will I end up with session object NULL if my Task.StartNew() thread takes a while to complete? And that multiplied by many users ...
I guess forget writing to session on these requests right? Would it give error or just ignore the written value?
Let's suppose thread pool size is not in the equation, I'd like to understand how session (wait) behaves in this scenario.
EDIT Can you explain why this works and is it granted in all stress scenarios?
var current = System.Web.HttpContext.Current;
AsyncManager.OutstandingOperations.Increment();
Task.Factory.StartNew(() =>
{
System.Web.HttpContext.Current = current;
Thanks