Where does TempData get stored?

Guillermo Gutiérrez picture Guillermo Gutiérrez · Feb 21, 2013 · Viewed 8.1k times · Source

Where does TempData get stored in the ASP.NET MVC Framework (more specifically, ASP.NET MVC 2)? Is it stored at server-side, or is sent to the client?

Answer

Darin Dimitrov picture Darin Dimitrov · Feb 21, 2013

By default TempData uses the ASP.NET Session as storage. So it is stored on the server (InProc is the default). But you could define other ASP.NET Session state modes: StateServer and SqlServer. You could also write a custom TempData provider and handle the storage yourself if you don't want to use the ASP.NET Session.