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

How can you execute stored procedure from windows application?

1 Answers   Microsoft,


What is ispostback property?

0 Answers  


Explain Features in ASP.NET

0 Answers   Microsoft,


What is viewstate?

6 Answers   Abacus, Microsoft, Sopra,


Explain Assemblies?,Difference between Panel and GroupBox?,Differences between ASP and ASP.NET?

1 Answers  






When maintaining session through Sql server, what is the impact of Read and Write operation on Session objects? will performance degrade..

3 Answers   Allsec Technologies,


what does membership class provide?

1 Answers  


What is asp according to you?

0 Answers  


What is the usie of activex control in .net?

0 Answers  


What is the syntax for datagrid and specifying columns?

0 Answers   Microsoft, SF,


In asp.net 3.5 we can go one page to onther page without using statemanagment concept?

1 Answers   ANR, Google, TCS,


What are the different modes for the sessionstates in the web.config file?

2 Answers  


Categories