Enable / disable session state per controller / action method

后端 未结 2 2067
傲寒
傲寒 2020-12-01 14:41

We are building an ASP.NET MVC application which will be deployed behind a hardware load balancer that supports, among other things, caching.

Our proposal is to manu

相关标签:
2条回答
  • 2020-12-01 14:59

    This is now moved from Futures into MVC3. There's a ControllerSessionState attribute (apparently will be named SessionState for the final release of MVC3), which can be applied to a controller, something like this:

    [SessionState(SessionStateBehavior.Disabled)]
    public class MyController : Controller
    {
     ...
    

    (But in the RC version, you must use ControllerSessionState

    0 讨论(0)
  • 2020-12-01 15:06

    This is included in MVC 2 Futures. See http://blogs.msdn.com/rickandy/archive/2009/12/17/session-less-mvc-controller.aspx for more info.

    0 讨论(0)
提交回复
热议问题