It requires this because of TempData. TempData is similar to ViewData, except that one day it will be displayed in the view and vice versa. To do this, he needs a cookie.
, , , .
, Kigg.
public class EmptyTempDataProvider : ITempDataProvider
{
public IDictionary<string, object> LoadTempData(ControllerContext controllerContext)
{
return new Dictionary<string, object>();
}
public void SaveTempData(ControllerContext controllerContext, IDictionary<string, object> values)
{
}
}
.
protected BaseController()
{
TempDataProvider = new EmptyTempDataProvider();
}
.