If we want to create some objects that will be used by all the action methods in the controller, can we save them as instance variables in the controller?
Phil Haack mentions that the controllers are not intended to be reused in this old post: Asp.Net MVC Beta: Does previous RouteData override current RouteData?
But is this behavior guaranteed by one controller per request?
I do not want to be in a situation where the reused controller has data from another request.
Yes (to the question in your title) and No (to the question in your message).
. , factory, , . , , , (, ), , factory.
, , . , . DefaultControllerFactory, . factory, , .
You can use TempData to store temporary data in the controller
Source: https://habr.com/ru/post/1721900/More articles:SQL Return Unique Data - sql-serverShould PHP code have spaces before operators? - code-formattingDetermining whether a number is a power of 2 in a circuit - bitwise-operatorsProblem with C # .NET constructor overload - constructorColdfusion - formatting an XML string returned from an API call - coldfusionDoctrine ORM: create a table as another - phpБета-версия Asp.Net MVC: Предыдущий параметр RouteData переопределяет текущую RouteData? - asp.net-mvccs-username не отображается в журналах IIS в классическом режиме IIS7 - asp.netTic Tac Toe Design Plan - designКак сделать сайт администратора безопасным? - securityAll Articles