Does ASP.NET MVC Framework support asynchronous pa

2019-04-06 23:41发布

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.

5条回答
倾城 Initia
2楼-- · 2019-04-07 00:23

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).

查看更多
对你真心纯属浪费
3楼-- · 2019-04-07 00:24

MVC 2 supports asynchronous page execution via AsyncController.

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

查看更多
Evening l夕情丶
4楼-- · 2019-04-07 00:29

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

查看更多
冷血范
5楼-- · 2019-04-07 00:33

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

查看更多
做自己的国王
6楼-- · 2019-04-07 00:40

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/

查看更多
登录 后发表回答