ASP.NET Development Server concurrent processing doesn't work

放肆的年华 提交于 2019-11-29 10:37:27
NotMe

The asp.net dev server (cassini) cannot handle multiple threads. So it effectively processes requests one at a time. Turning session off really won't impact this.

It's really just for limited single user testing of a web app.

I'd recommend you dump cassini and install IIS Express or just go to the full IIS implementation.

A little reading: ASP.NET Dev Server (Cassini), IIS Express and multiple threads

IIS on XP doesn't allow that many concurrent connections (I think it's 10). If you're developing in that environment, that may be why you're experiencing that (besides those 2 requests, you have requests for referenced files taking place, plus you may be issuing more requests than you think you are for that particular page).

I'm not sure if VS built-in server has similar limitations.

Simon_Weaver

If you're using ASP.NET MVC without disabling SessionState (which by default you would be) your requests will be automatially serialized - so if you're checking for race conditions with a random Thread.Sleep() value then Request B will never complete before Request A even if the time slept for is less.

ASP.NET MVC and Ajax, concurrent requests?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!