質問

Is there a cap or best practice with regards to how much data should be placed in the TempData dictionary?

役に立ちましたか?

解決

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:

ASP.NET Session State Overview

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top