If you use the default controller factory a new instance will be constructed for each request and that’s the way it should be. Controllers shouldn’t be shared among different requests. You could though write a custom factory that manages the lifetime of the controllers.
More Related Contents:
- How to use signalr in Android
- Passing data between different controller action methods
- Is Task.Run considered bad practice in an ASP .NET MVC Web Application?
- Redirect From Action Filter Attribute
- Email address validation using ASP.NET MVC data type attributes
- Facebook/ Twitter with dotnetopenauth? [closed]
- How to enable cross origin requests in ASP.NET MVC [duplicate]
- Do I need a Global.asax.cs file at all if I’m using an OWIN Startup.cs class and move all configuration there?
- Mock HttpContext for unit testing a .NET core MVC controller?
- How do I define a method in Razor?
- GET and POST methods with the same Action name in the same Controller [duplicate]
- Where are the ControllerContext and ViewEngines properties in MVC 6 Controller?
- Reflecting parameter name: abuse of C# lambda expressions or syntax brilliance? [closed]
- MVC 4 Edit modal form using Bootstrap
- Why am I getting ‘One or more types required to compile a dynamic expression cannot be found.’?
- Return “raw” json in ASP.NET Core 2.0 Web Api
- Incorrect List Model Binding indices when using HTML Helpers
- Entity vs Model vs View Model
- Getting a Request.Headers value
- Where is Request.IsAjaxRequest() in Asp.Net Core MVC?
- Return JSON with error status code MVC
- Method ‘RouteCollection.get_AppendTrailingSlash’ not found when using Razor Url helpers in ASP.NET MVC 5 Mono
- Set Default DateTime Format c#
- Effectively use async/await with ASP.NET Web API
- Keyword Not Supported: Metadata
- Entities VS Domain Models VS View Models
- ASP.NET Web API and [Serializable] class
- System.web.mvc missing
- How to route EVERYTHING other than Web API to /index.html
- Using DataAnnotations to compare two model properties