I have the following setup in my web.config file to handle errors:
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="500" />
<error statusCode="500" responseMode="ExecuteURL" path="/error/internalservererror/" />
</httpErrors>
When I throw an exception in my app it works fine locally but it redirects to the following URL in error-page in azure (note that the page I threw the exception from is at the end of the URL:
How do I stop IIS from exibiting this behaviour in Azure?