I would like to have a very lightweight ASP.NET MVC site which includes removing as many of the usual HttpModules as possible and disabling session state. However when I try
I've found one way, which I don't particularly care for:
Create NoTempDataProvider
using System;
using System.Collections.Generic;
using System.Web.Mvc;
namespace Facebook.Sites.Desktop.Auth.Models
{
public class NoTempDataProvider : ITempDataProvider
{
#region [ ITempDataProvider Members ]
public IDictionary LoadTempData(ControllerContext controllerContext)
{
return new Dictionary();
}
public void SaveTempData(ControllerContext controllerContext, IDictionary values) { }
#endregion
}
}
Manually Overwrite the Provider in the Controller
public class AuthController : Controller
{
public AuthController()
{
this.TempDataProvider = new NoTempDataProvider();
}
}
I would greatly prefer a way to do this completely via the configuration, but this works for now.