'IIS configuration - web.config. Problem with redirecting to error page

I have problem with IIS configuration.

I have SOAP Service available via IIS.

When I create request with good values I will receive 200 and content type as text/xml and body as xml string.

When I create request with wrong values - in my code I will throw FaultException, but from Visual Studio I receive 500 and body as xml string with my values, but on my server environment somehow I am redirecting to error page.

I tried to setup this in web.config file, but after removing all values connected with errorPages - still the same problem.

Any idea how to fix this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source