Showing posts with label status. Show all posts
Showing posts with label status. Show all posts

Monday, March 26, 2012

PageRequestManagerServerErrorException (Status Code: 413)

I hope someone can help me.

This is the message:
- Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 413.

The scenerio is quite simple: A master page contains the Script Manager. The others pages have their own update panels and controls (nothing special, just list box and grids).

Sometimes the above error ocurrs, sometimes not.

The application is on HTTPS and requires client certificates.

Any idea?

Regards,
Alano

Hi Alano,

The status code 413 means that Request Entity Too Large.
The 413 status code indicates that the request was larger than the server is able to handle, either due to physical constraints or to settings. Usually, this occurs when a file is sent using the POST method from a form, and the file is larger than the maximum size allowed in the server settings.

Please?try?to set the maxRequestLength property to a larger value. For how, please refer to this:
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx

Hope this helps.

Raymond,

Thanks very much for your answer, the first about this problem I've seen on the Internet.
Our web.config already has a maxRequestLength set to 2000000. We don't expect use this, but we have it on web.config. I also have set the UploadReadAHeadSize on IIS 6.0 to 64k.
If you have another hint, I'll appreciate that.

Thanks again.

Alano.


We solved our problem, I suppose, with a IIS metabase parameter (UploadReadAHeadSize).
Some pages of our web site has more than 80k. I have set the that IIS metabase parameter to 128k and things are going now.
For more information you can see:
http://technet2.microsoft.com/windowsserver/en/library/0ef55842-24d2-4060-bb98-d69e2877a6671033.mspx?mfr=true

PageRequestManagerServerErrorException, status code 504

I got the following error message on my ASP.NET AJAX web app:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 504

What does it mean?Huh?

Hi monkeyno,

10.5.5 504 Gateway Timeout

The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.

 Note: Note to implementors: some deployed proxies are known to return 400 or 500 when DNS lookups time out.

To troubleshoot this issue, we really need the source code to reproduce the problem, so that we can investigate the issue in house. It is not necessary that you send out the complete source of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it.

You get the Sys.WebForms.PageRequestManagerServerErrorException whenever the aspx handler throws an exception responding to an ajax.net update panel submit. If you took away the update panels you would see the classic asp.net exception page with lots of potentially useful information like the stack trace, but since the form submit has been ajaxified you just get a generic error message through a javascript alert. For example create an aspx page with an update panel containing a button and a multiline text control with the text set to "".

monkeyno:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server.

Clicking on the button you'll get the generic error: The status code returned from the server was: 500 Now try it again after placing the controls outside of the update panel. When you click the button you will get an exception page with details about a potentially dangerous/script-attack form value. The exception evens details a possible (though non-recommended) workaround of adding the attribute, ValidateRequest="false", to the aspx page directive. Of course for a real page it's a pain to strip out the update panels, so here is a quicker way to see the exception details. Just add the attribute, EnablePartialRendering="false", to your ScriptManager like below. Just set it back when you're done troubleshooting the issue.