开发者

Connection Reset after concurrent AJAX and Standard form POST

Scenario:

  • Own rolled jQuery Ajax post to validate an input field on unfocus
  • Standard submit button for post on form

If I cause validation to fire and wait until I see it complete in firebug then click save all is fine. If however I leave a change in a field and then click the submit button directly (so both ajax and standard post happen at almost the same time) the request hangs in the browser before returning a 'connection reset'. If running in VS debug I see nothing unless I hit pause. I am then presented with the following callstack:

System.Web.dll!System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(byte[] buffer, int offset, int size) + 0x23 bytes

System.Web.dll!System.Web.Hosting.IIS7WorkerRequest.ReadEntityBody(byte[] buffer, int size) + 0x18 bytes

System.Web.dll!System.Web.HttpRequest.GetEntireRawContent() + 0x2d4 bytes

System.Web.dll!System.Web.HttpRequest.Get开发者_JAVA百科MultipartContent() + 0x45 bytes

System.Web.dll!System.Web.HttpRequest.FillInFormCollection() + 0xad bytes

System.Web.dll!System.Web.HttpRequest.Form.get() + 0x45 bytes

System.Web.dll!System.Web.HttpRequest.HasForm.get() + 0x46 bytes

System.Web.dll!System.Web.UI.Page.GetCollectionBasedOnMethod(bool dontReturnNull) + 0x62 bytes

Background:

ASP.NET 4 MVC 2 Web application with some legacy webforms pages (the page involved in both the ajax post and standard post is the same webforms page) running locally on Win7/IIS7.

I could potentially disable the submit button while the ajax validation fires. However even if I do that I'm intrigued to know what has caused this seemingly time based/concurrent request problem.


Can you disable the ajax post, when clicking happens? this way you have to check for the conditions in the click event, before you do anything else.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜