Enable / disable session state per controller / action method

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

Leave a Comment