Posted 21 October 2020, 12:42 pm EST
We have 2 servers, In server1, IIS configuration has a virtual directory which has the HTML page of the URL.
In server2, IIS configuration the virtual directory points to the directory in server1(same directory configured in server1).
while accessing the URL by localhost in server1 displays a General error as mentioned in the config file, whereas accessing the URL by localhost in server2 displays Runtime error(mentioned below) although it points to the same config which server 1 points. There is no access issue between the servers.
Server Error in ‘/’ Application
Runtime Error:
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
Web Config:-
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<remove statusCode="403" subStatusCode="-1" />
<error statusCode="403" prefixLanguageFilePath="" path="/GeneralErrorPage.htm" responseMode="ExecuteURL" />
<error statusCode="404" prefixLanguageFilePath="" path="/GeneralErrorPage.htm" responseMode="Redirect" />
</httpErrors>
<directoryBrowse enabled="false" />
</system.webServer>
<system.web>
<customErrors defaultRedirect="GeneralErrorPage.htm" mode="Off">
<error statusCode="404" redirect="GeneralErrorPage.htm"/>
</customErrors>
</system.web>
</configuration>