Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My API returns JSON content with some errors, such as 500 (Bad Request). Under IIS 6, this worked fine. In IIS 7, once I turn off detailed error messages it simply returns the text "Bad Request". How can I keep the contents of my response intact?

share|improve this question
Have you found an answer to that question? I'm interested in it. Thank you. – Jean-Francois Feb 5 '13 at 21:25
@Jean-Francois I must have, because I don't have this problem anymore. I'm surprised I didn't come back here add an answer. I'll take a look and see if I can remember what I did. – Keith Walton Feb 6 '13 at 19:48

You need to set the Error Responses to 'Detailed errors' in the Error Pages setting of IIS7. Open that, then click on 'Edit Feature Settings', you'll find it there.

share|improve this answer

You might want to check this custom error series

share|improve this answer
This article shows how to return a static error page. My error is dynamic, and set as the response content: {"error":"Message..."} – Keith Walton Dec 7 '11 at 18:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.