views:

53

answers:

0

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.GetMultipartContent() + 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.