1

I'm new to ASP.Net MVC 3.0 and I've found the SessionLess controller concept. However, concept is not clear to me and can you please explain the usage of sessionless controllers vs SessionState ?

What are the best practices when using session data in Asp.net MVC 3.0?

marvelTracker
  • 4,691
  • 3
  • 37
  • 49
  • Hi, you can read about this in many places online: http://afana.me/post/session-less-controllers-and-TempData-ASPNET-MVC.aspx is just one out of many links – Davide Piras Aug 29 '11 at 10:09

2 Answers2

2

David Hayden wrote a nice post about

See this post for clarification: http://davidhayden.com/blog/dave/archive/2011/02/09/SessionLessControllersMvc3.aspx

Update

New link:

http://code-inside.de/blog-in/2011/01/12/howto-sessionless-controller-in-mvc3-what-and-why/

In this post the 'what' and 'why' are better explained, including a a demo and performance test.

wnascimento
  • 1,949
  • 1
  • 19
  • 16
2

In order to enable parallel execution of requests you don't need to make the controller session-less, the SessionStateBehavior.ReadOnly has the same behavior without dropping access to session variables, more on this topic here Parallel processing of concurrent Ajax requests in Asp.Net MVC

Stefan P.
  • 9,489
  • 6
  • 29
  • 43
  • Link is dead. Here is an archived: https://web.archive.org/web/20140204071237/http://www.stefanprodan.eu/2012/02/parallel-processing-of-concurrent-ajax-requests-in-asp-net-mvc/ – rlv-dan Jun 05 '17 at 05:09