3

What is the concurrency model behind ASP.NET MVC 3? I mean, when many users are accessing a ASP.NET MVC 3 website, do we have a new instance of controller for each request or the one controller is shared for one user session or all users?

Could you point to some proper documentation on this?

2 Answers 2

4

Yes, if you use the default controller factory, each request instantiates a new controller instance.

There's interesting reading here.

Sign up to request clarification or add additional context in comments.

Comments

2

Yes, you get a single instance for each request which is disposed at the end of the request. The best documentation I know of for such details is the source code.

I described the flow which calls Controller.Dispose in this older question.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.