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

How is it possible for .NET to support many languages?

306


What is the function of the ViewState property?

643


What is the difference between asp.net mvc and asp.net webforms? : asp.net mvc

541


What is difference between web api and web services?

537


Explain how do you validate the controls in an asp .net page?

523






Explain how viewstate is being formed?

541


What is ascx?

537


What are the two properties that are common on every validation control?

559


Elaborate differentiation between ViewState and SessionState?

616


14. What are your Future Plans for Swatz Oils GROUP U.K?

1726


What is syntax code to send email from an asp.net application?

534


To redirect the user to another page which method do we use without performing a round trip to the client?

535


What are the steps to follow to host a web application on a web server?

591


Describe Segmentation With Paging?

632


Why do we need Sessions?

578