views:

40

answers:

2

Having a weird bug in production and just wondering if it's possible for a half submitted web page to processed by the server?

The page has no view state just using plain old html controls and accessing data displayed in repeater on the back end via Request.Form[name] etc.

Is it possible for a request to be truncated perhaps due to lost internet connection and the page still processed by the server. Therefore if field not part of the request Request.Form[name] could result in null?

I know can use fiddler to modify request but unfortunately we are not allowed to change group policy and change the proxy!

Many Thanks

A: 

This is not possible. The page is submitted or not.

To debug the problem, log all the form fields (name and values) and look for errors there. Chances are that you are using the same ID or Name and that is the reason you are loosing fields.

Eduardo Molteni
+1  A: 

Is it possible for a request to be truncated perhaps due to lost internet connection and the page still processed by the server ?

Yes this is possible, if some one press the submit button, even if the page is not fully loaded the browser close the form and submit what ever have until that moment. !

To check if the page is full send it, left EnableEventValidation=true If the page is not fully send it then you get a throw error.

I think also the Page.IsValid function do a similar work. If page isValid then you get all data.

So if you have a delay on a part of a page you get what ever data browser have until then.

To test what I say use this code inside your page, the moment your page is reach this delay, do a click on a button, and you get only the data up to this point.

<%
Response.Flush();
System.Threading.Thread.Sleep(10000);
%>

Any page can submitted with corrupted data, happens many times,

and thats why ms have include the __EVENTVALIDATION hidden control in every page (except if you disabled it), to check if the page is corrected send it back.

Aristos
Thank can now replicate with your suggestion and explains the odd behavior.
c00ke