0

My AngularJS makes RESTful API calls to my ApiController.

Everything works fine in localhost, but returns a boring and frustrating {"message":"An error has occurred."} when testing on IIS Server.

I have made sure these things are in place. There is a good post in here.

<system.webServer>
  <httpErrors existingResponse="PassThrough" />
</system.webServer>


<system.web>
  <customErrors mode="Off"/>
</system.web>

On the IIS7, I go to Error Pages >> Edit Feature Settings >> Error Responses is now Detailed errors.

How can we see the detailed exception? Have I missed something else?

Community
  • 1
  • 1
Blaise
  • 21,314
  • 28
  • 108
  • 169
  • You see the message, do you see anything else in the returned JSON? http://blogs.msdn.com/b/youssefm/archive/2012/06/28/error-handling-in-asp-net-webapi.aspx should tell you what you would be looking for. – Josh May 29 '14 at 14:23
  • Unfortunately I have seen nothing else. It would be helpful if I can see some `ExceptionMessage` and `StackTrace`, which are exactly what I need. – Blaise May 29 '14 at 14:30
  • What is the status code that comes back from IIS? – Josh May 29 '14 at 15:08

0 Answers0