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?



If I update session state, should I lock it, too? Are concurrent accesses by multiple requests execu..

Answer / 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

More ASP.NET Interview Questions

What is the difference between ASP and ASP.NET?

4 Answers   Sans Pareil IT Services, TCS,


How to sign out from forms authentication?

0 Answers  


write six HTTP request method?

4 Answers   IBM,


What is s2s tracking?

0 Answers  


Describe the .net base class library.

0 Answers  


Which is better session or viewstate?

0 Answers  


What are asynchronous callbacks?

0 Answers   Accenture,


how to update data set?

3 Answers   IBM, TCS,


How can we inherit a static member?

0 Answers  


How do I create a web form?

0 Answers  


what to magage the state manament in asp.net with respect to in_prock and out_prock

1 Answers   Aviva,


What are the various session state management options provided by asp.net?

0 Answers  


Categories