What is the maximum amount of data that should be placed in TempData?
-
31-05-2021 - |
Frage
Is there a cap or best practice with regards to how much data should be placed in the TempData dictionary?
Lösung
Check this post that describes best practices when using TempData:
When to use ViewBag, ViewData, or TempData in ASP.NET MVC 3 applications
This one goes even further:
ASP.NET MVC: Do You Know Where Your TempData Is?
Bottom line is: By default, TempData is stored in the Session object. So the limit is the limit of your Session object. See this post for some insight.
Things to consider:
- Generally, Session is stored in workerprocess memory eg.: in RAM....
- To increase the amount of available memory, check the memory limit of your Application Pool in IIS.
For a more in-depth view of the Session object, check this doc at MSDN:
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow