We provide a web service to a third party that expects 500 errors when an application-level error occurs. When this happens, we build a piece of custom XML with error data (eventcode, etc.) and return it as a synchronous response.
However, it seems that IIS is catching the 500 error and replacing our custom XML with a “beautiful” html page.
Does anyone know how I can stop this? We tried to disable user errors in IIS, and all we will return to this setting is the error line and now our custom XML.
Notes: IIS version 7 (Windows Server 2008) with a custom handler that we developed last week.
source
share