Asynchronous threads and session
When a new async thread has been spawned using this signature, will the ASP.NET session object be available to the this new thread?
IAsy开发者_JS百科ncResult asyncCall = f.BeginInvoke(null, f);
I don't know about which session object you are talking about but if you talk about the ASP.NET Session it might not be available. Also it is bad practice to access the ASP.NET Session from background threads. I would recommend you passing an object containing all the necessary information to this background tread instead of having it pull stuff from a session => makes it less reusable.
Normally if the caller of this thread waits for it to complete the session should be available all along but honestly it's bad design and I would simply avoid it.
精彩评论