Marty Trenouth
Marty Trenouth

Reputation: 3752

Controller creation question

in MVC.NET is a controller created once, or for each request?

Upvotes: 1

Views: 194

Answers (2)

Dave Swersky
Dave Swersky

Reputation: 34810

The Controller is instantiated on each request.

http://blog.stevensanderson.com/2007/11/20/aspnet-mvc-pipeline-lifecycle/

Upvotes: 0

Victor Haydin
Victor Haydin

Reputation: 3548

It depends on used IControllerFactory realization. But DefaultControllerFactory creates new controller instance for each request.

Upvotes: 2

Related Questions