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 does assemblyinfo.cs file consist of?

2 Answers   Accenture, HCL,


In cache where dats is stored and how(file or object?)

2 Answers  


Have u used webcontrols?Tell me something about these?

2 Answers   Microsoft,


Can you explain architecture of your project ?

0 Answers  


After building the custom control, you test it by adding an ASP.Net web application to the solution. You add a correct <%@ Register %> directive and a proper declaration of the control in the <asp:Form> tag to the Web Form, but when you execute the application you get an error. What is the most likely reason for the problem? a) The custom control must be compiled first. b) The web application must have a reference to the control c) The custom control must be registered with windows first. d) The assembly from the custom control is not in the application?s bin directory.

1 Answers   Syntax Softtech,






What are the new features implemented in ASP.NET?

0 Answers   TCS,


Can the validation be done in the server side? Or this can be done only in the Client side?

2 Answers  


What is a session in asp.net?

0 Answers  


How do you change the session time-out value?

0 Answers   TryTechnicals Pvt Ltd,


what is the role of aspx file ?

2 Answers   Netsweeper,


What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"

12 Answers   Phoenix Technologies,


What is the use of global.asax file?

0 Answers  


Categories