3

We are storing user permission information in session object when sign in success. We are reading this session object in every action. When accessing session if session is Null, we do reinitialize the session. We are using MVC 5. My queries are, 1. Since in every action there may be chances for reinitialize the session(if session is Null). Does this affect application response time? 2. By doing this every request locks the session object. How do avoid session lock?

Thanks, Kannan Eswar.

kannan Eswar
  • 427
  • 2
  • 4
  • 14
  • possible duplicate of [Does Session timeout reset on every request](http://stackoverflow.com/questions/10370110/does-session-timeout-reset-on-every-request) – Viktor Kireev Jul 06 '15 at 09:39
  • @victor, I have edited the question. – kannan Eswar Jul 08 '15 at 06:45
  • sorry I do not understand what the real problem is. Microsoft says about session - ASP.NET provides session-state management to enable you to store information associated with a unique browser session across multiple requests. What do you mean by locking session? What are you expecting of HttpSessionState object? – Viktor Kireev Jul 08 '15 at 07:21
  • When I Google found that, every request lock the current user session. http://stackoverflow.com/questions/3629709/i-just-discovered-why-all-asp-net-websites-are-slow-and-i-am-trying-to-work-out Consider user A concurrently sending 10 Ajax request to server. Each request is taking 2 seconds to complete. So totally it took 20 seconds to process all the request. Every request locks the current user session until the current request get processed. When request 1 is processing, remaining all other will be waiting to acquire the session objects. I have to avoid this session locking? – kannan Eswar Jul 08 '15 at 10:10

0 Answers0