Click here to Skip to main content
Click here to Skip to main content

Http 500 Error resolution

, 8 Feb 2012
Rate this:
Please Sign up or sign in to vote.
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. Smile | :)

License

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

About the Author

M I developer
Technical Lead
Pakistan Pakistan
<Profile>
<Profession>
I am a Software Engineer from Karachi Pakistan, Being a programmer obviously I love to code but I love to code that adds something new in my knowledge else I do copy paste usually Smile | :)
</Profession>
<Education>
Have done Master and Bachelors of Computer Science from Karachi University Pakistan
</Education>
<Interests>
Anything I found interesting technically or non-technically so nothing specific Wink | ;)
</Interests>
</Profile>

Comments and Discussions

 
GeneralMy vote of 3 PinmemberFarhan Ghumra21-Jun-12 2:35 
GeneralRe: My vote of 3 PinmemberM I developer21-Jun-12 19:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 8 Feb 2012
Article Copyright 2012 by M I developer
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid