views:

33

answers:

1

I have following problem.

in one request i am updating session variable. in the other request, i am trying to access that session value, but it was blocked until the first request finish.

I am using C# with ASP.NET 2.0

UPDATE:

My page code looks like this.

while(int progress = DoWork() && progress <= 100 ){
    Session["Progress"] = progress;
}

and my handler just return Session value.

context.Response.Write(Session["progress"].toString());
context.Response.End();
A: 

You really should not be running concurrent calls with ASP.net due to the nature of how the apps are developed. This sounds like a normal locking mechanism , the only thing you can really do is cater for a lock and just keep the thread waiting till the other thread is done.

If possible post some code as to what you are running multiple threads at the same time , there maybe a better way to do it.

RC1140
@stalkerh i have updated the question