If I update session state, should I lock it, too? Are concurrent accesses by multiple requests executing on multiple threads a concern with session state?

Answer Posted / kumar saurabh

Concurrent accesses aren't an issue with session state, for two reasons. One, it's unlikely that two requests from the same user will overlap. Two, if they do overlap, ASP.NET locks down session state during request processing so that two threads can't touch it at once. Session state is locked down when the HttpApplication instance that's processing the request fires an AcquireRequestState event and unlocked when it fires a ReleaseRequestState event.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a postback in asp net?

641


What are the benefits of Razor View?

627


What are session state modes in asp.net?

637


Explain the difference between debug.write and trace.write? When should each be used?

652


What are the new features implemented in ASP.NET?

693






Can we have multiple master pages in asp net?

607


To get the values in two different controls to match which control you use it?

650


What is rending process in ASP.NET?

706


What is asp net objects?

612


What is difference between URL and URI?

721


What is the function of new view engine in asp.net? : asp.net mvc

626


What are the advantages of the code-behind feature?

613


Explain the differences between managed and unmanaged code?

576


Is it possible to change the index of primary key on table?

492


I want to connect a system in LAN and I want to access that. Whenever I am moving a mouse in my desktop, the similar thing has to happen in another system in which I have connected. I need coding for this in C# and ASP.NET Can anyone please help me. It is very urgent. Thanks in advance. My email id is manojkumarchallagundla@gmail.com Will you please?

1552