Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / DevOps / deployment

Http 500 Error resolution

4.60/5 (4 votes)
8 Feb 2012CPOL 48.1K  
Http 500 Error resolution
I was building the ASP.NET service. In that service, when anything goes wrong like input data is not validated or some internal server error, I take that exception and then convert it to my JSON object, set Http ErrorCode to 500 and return JSON object to the client, but when I deployed that service to the production environment that is Windows Server 2008, IIS 7 then if anything went wrong so server didn't return my JSON object and the only thing which the server returned was the HTTP Error Code 500, well after scratching my head for one whole day, my colleague helped me out by setting the property on IIS. This is how we did it.

IIS->Sites->(DefaultWebSite or your Site)->Feature View->Double Click Error Pages->Edit Feature Settings -> select Detailed Errors -> press OK.

wuhhh, finally problem resolved. :)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)