IIS7 HTTP Error 500.19 – Internal Server Error
Having upgraded a Server 2008 box with Service Pack 2 we noticed an issue when creating/using custom error pages in IIS. Unless it was down to my poor search terms I couldn't initially find much on the error as I'm no IIS expert, but it appears to be down to some changes made to IIS as part of the SP2 upgrade.
As the server was hosting Microsoft Exchange 2007 it was used for Outlook Web Access. We tend to make use of the redirect page to load from mail.domain.com straight to https://mail.domain.com/owa as per this MS article
When setting this up we found we received the below error (as well as Outlooks Out of Office not working):
ERROR:
HTTP Error 500.19 - Internal Server Error
Absolute physical path "C:\inetput\wwwroot\redir.htm" is not allowed in system.webserver/httpErrors section in web.config file. Use relative path instead.
FIX:
To resolve this as the error states we just needed to amend the path to the custom error page. This can be done either in the IIS console or by editing the web.config file usually in the \inetpub\wwwroot folder. Open the file in a text editor and edit the file path.
Absolute path:
-
<httpErrors>
-
<remove statusCode="403" subStatusCode="-1" />
-
<error statusCode="403" prefixLanguageFilePath="" path="C:\inetpub\wwwroot\redir.htm" responseMode="File" />
-
</httpErrors>
Relative path:
-
<httpErrors>
-
<remove statusCode="403" subStatusCode="-1" />
-
<error statusCode="403" prefixLanguageFilePath="" path="redir.htm" responseMode="File" />
-
</httpErrors>
