Getting Detailed Error Info in IIS 7
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.
Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".
|
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
|
Solution
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
<aspNetCore processPath=".\LibPrograms.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>
<system.web>
<customErrors mode="Off" />
<compilation debug="true" />
</system.web>
</configuration>
Please note:
For Net Core apps:
1. ASPNETCORE_ENVIRONMENT must set to Development in order to display detailed errors
2. The highlighted rows are enough for displaying detailed errors
HTTP 500 - Internal Server Error
IIS > Sites > Your Site > double click "Failed Request Tracing Rules" :
1. Edit Settings > Enable
2. Add >All contents (*) > Status Code: 500
Then check logs at C:\inetpub\logs
Note: if "Failed Request Tracing Rules" is not available in IIS, please go to Control Panel/Programs and Features/Turn Windows Features on or off/Internet Information Service/World Wide Web Service/Health and Diagnotics/Check Tracing/Close and re-open IIS
http://mvolo.com/troubleshoot-iis7-errors-like-a-pro/
HTTP 500 - Internal Server Error
IIS > Sites > Your Site > double click "Failed Request Tracing Rules" :
1. Edit Settings > Enable
2. Add >All contents (*) > Status Code: 500
Then check logs at C:\inetpub\logs
Note: if "Failed Request Tracing Rules" is not available in IIS, please go to Control Panel/Programs and Features/Turn Windows Features on or off/Internet Information Service/World Wide Web Service/Health and Diagnotics/Check Tracing/Close and re-open IIS
http://mvolo.com/troubleshoot-iis7-errors-like-a-pro/
Comments
Post a Comment