Asp.net can handle half of the sent webpage?

Having a weird production error and just wondering if it is possible to process half of the submitted web page by the server?

There is no view state on the page, just using plain old html controls and accessing the data displayed in the repeater at the back via Request.Form [name] etc.

Is it possible for the request to be truncated, possibly due to a lost internet connection and the page still being processed by the server. So what if a field that is not part of the Request.Form [name] can result in null?

I know I can use a script to change the request, but unfortunately we are not allowed to change group policy or change proxy!

Many thanks

+2


a source to share


2 answers


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

Yes, it is possible if someone clicks the submit button even if the page is not fully loaded, the browser closes the form and submits what was up to that point!

To check if the page is full, submit it, leaving EnableEventValidation = true If the page does not fully submit, you will get a throw error.

I also think the Page.IsValid function does a similar job. If the page isValid, you get all the data.

So, if you have a snooze on a portion of the page, you get what the data browser has ever had until then.



To check what I am saying, use this code inside your page , once your page reaches this delay, click on the button and you will only get the data up to that point.

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

      

Any page can be sent with corrupted data , happens many times,

and that's why ms contain a hidden __ EVENTVALIDATION element on every page (except when you disabled it), to check if the page is fixed, send it back.

+1


a source


It's impossible. The page was sent or not.



To debug the problem, write down all the form fields (name and values) and look for errors there. Chances are you are using the same ID

or Name

, and it is for this reason that you are losing fields.

0


a source







All Articles