Showing posts with label 500 error. Show all posts
Showing posts with label 500 error. Show all posts

Wednesday, March 26, 2014

JSON Webservice Error There was an error processing the request

I was dealing with this error for a couple or more hours with a JSOn Webservice in asp.net when calling from JQuery and Backbone.js client side application. When I was returning a simple entity it was working just fine but when I wanted to return a complex object type it was failing.

Any ways after looking and trying different things I found that the issue was with the max response limit was exceeding. Of course it was hard because there was no detail error log information any where. The webservice class was not throwing any particular exception. IIS was just return the Error 500 with this message.

Message":"There was an error processing the request.","

The FIX:

Simply added this to the web.config where the .ASMX class lives and the problem was solved.


<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="50000000" />
</webServices>
</scripting>
</system.web.extensions>

Friday, October 24, 2008

Flash uploading large files to ASP.NET: HTTP 500 Error

If you are having trouble uploading large files via flash or standard asp.net form its probably because there is a max request length set in the machine.config file. Max request length by default is set to 4MB.

When exceeding the max request length you get a HTTP 500 error code.
If you check the Application Event viewer on the server side you might see errors such as this:

Event code: 3004
Event message: Post size exceeded allowed limits.
Event time: 10/24/2008 5:11:39 PM
Event time (UTC): 10/24/2008 10:11:39 PM
Event ID: 640ae5c3a03349b18112b5289fd09989
Event sequence: 12
Event occurrence: 3
Event detail code: 0




To solve this problem override your web.config with the following configuration element.

Also update the executionTimeout to allow more time before it shuts down the request.



<configuration>

<system.web>

<httpRuntime maxRequestLength="11000" executionTimeout="60" />

<!-- 50MB max request size-->




More information can be found at the MSDN site

http://msdn.microsoft.com/en-us/library/e1f13641(VS.71).aspx