-
Notifications
You must be signed in to change notification settings - Fork 1
IIS can override error response with its own pages, how to disable.
I had a problem originally that I was returning a 405 error with a custom resource containing an error string. Which worked fine on my development platform, but deployed to Win2k8R2 IIS 7.5 and I was getting back html pages with my 405. Turns out this return was IIS Custom Errors kicking in.
Most places on web it says to Disable "Customer Errors". Under IIS7.5 it is not called Custom Errors it is called Error Pages.
So in the administration console for IIS go to the root of your application in feature view and select "Error Pages" in error pages go to the option on the right called "Edit Feature Settings..". In here mine was set to "Detailed errors for local request and custom error pages for remote requests" switching this to "Detailed errors" means IIS will not replace responses.
Thanks to Sebastian for getting me to this point, I was lost for a while.