Author: Ratbag | Posted on: 2/12/2009 11:50:14 PM | Views : 286

We have a static web method on a page and it is invoked from client using
ajax. In our local testing environment, when an error occurs and
exception is thrown, a json format response with some information
wrapped up by ajax framework is returned. However, on our website hosted by a hosting service we can only receive a text/html
response with an 500 Internal Server Error. (viewed in fiddler)

In our local testing environment it returns:


HTTP/1.1 500 Internal Server Error

Content-Type: application/json

Server: Microsoft-IIS/7.0

jsonerror: true

Date: Thu, 12 Feb 2009 05:36:46 GMT

Content-Length: 229



{"Message":"YAM","StackTrace":" at
S2.WebApp.Governance.Default.errorTest() in
C:\\Users\\Administrator\\Documents\\S2Source\\S2Live\\S2.WebApp.Governance\
\Default.aspx.cs:line 47","ExceptionType":"System.ApplicationException"}





In hosting environment, it returns:



HTTP/1.1 500 Int ...

Go to the complete details ...