Click here to Skip to main content
15,883,884 members
Articles / DevOps / Deployment
Tip/Trick

Http 500 Error resolution

Rate me:
Please Sign up or sign in to vote.
4.60/5 (4 votes)
8 Feb 2012CPOL 47.5K   2   2
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)


Written By
Technical Writer
United States United States
<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 Pin
Farhan Ghumra21-Jun-12 2:35
professionalFarhan Ghumra21-Jun-12 2:35 
GeneralRe: My vote of 3 Pin
M I developer21-Jun-12 19:29
professionalM I developer21-Jun-12 19:29 

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

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