Morgan Cheng
Morgan Cheng

Reputation: 76048

Does ASP.NET MVC Framework support asynchronous page execution?

I'm learning ASP.NET MVC Framework, From some articles like this, it seems that MvcHandler has only Execute() implemented, there is no asynchronous API implemented. Actually, I don't think Controller has asynchronous API either.

So, ASP.NET MVC doesn't support asynchronous programming? this could be a big hurdle to scalability if the web page needs I/O operation.

Upvotes: 8

Views: 3754

Answers (5)

Clay Lenhart
Clay Lenhart

Reputation: 1606

MVC 2 supports asynchronous page execution via AsyncController.

http://msdn.microsoft.com/en-us/library/ee728598.aspx

Upvotes: 3

Pita.O
Pita.O

Reputation: 1837

ASP.NET MVC 2 has now incorporated asnyc controller from the beat release. Check it out.

Upvotes: 1

Andrew Csontos
Andrew Csontos

Reputation: 662

As Brad mentioned, Microsoft is working on a solution as part of MVC futures. There is also an implementation at: http://code.msdn.microsoft.com/AsyncMvc/Wiki/View.aspx?id=11350

Upvotes: 1

Morgan Cheng
Morgan Cheng

Reputation: 76048

After some googling, I found this terrific blog about how to DIY asynchronous ASP.NET MVC. The implementation looks easy and straightforward. I am wondering why ASP.NET MVC team doesn't have this feature at the first time.

http://blog.codeville.net/2008/04/05/improve-scalability-in-aspnet-mvc-using-asynchronous-requests/

Upvotes: 7

Brad Wilson
Brad Wilson

Reputation: 70676

At the moment, async support is not built into MVC. It's on the feature list, but no guarantees as to exactly when it might be released (and in what form).

Upvotes: 6

Related Questions