I was trying to make one site as session less. So add <sessionState mode="Off" />
to my web.config. After that if I execute
Session["test"] = "yes";
I get an error “Object reference not set to an instance of an object.” This is fine.
But with this configuration I can set
TempData["test"] = "yes";
in controller and print TempData["test"];
in View page. It is working well.
As per MSDN “The TempData property value is stored in session state”.
So if I mention <sessionState mode="Off" />
how TempData is working? Is ASP.NET still storing TempData in session or somewhere else?