MohammadYounes/OWIN-MixedAuth

Trapping 500 error when IIS incorrectly configured

Opened this issue · 1 comments

Hi,

Is there any way of trapping the 500 server error that occurs when the IIS server is incorrectly configured (Authentication - Windows NOT set to Read/Write in IIS root site feature delegation). I want my application to fall back to forms logon (with an 'incorrectly configured server' error message) when the server is not configured correctly.

Thanks

Chris

Hi Chris,

This is a server level error, You can only trap it inside httpErrors. Might be possible to redirect to a page or action to reconfigure the app:

<httpErrors errorMode="Custom">
  <remove statusCode="500" subStatusCode="19"/>
  <error statusCode="500" subStatusCode="19" path="fallback.aspx" responseMode="Redirect" />
</httpErrors>

Thanks!