Enable Error Messages in ASP.NET 5+


If you receive errors in your ASP.NET 8, 7, 6, & 5 application or it fails to start with an error message saying "An error occurred while starting the application" then enabling detailed error logging should help you debug your application and fix the problem.

This article shows you how to enable detailed error logging for ASP.NET 8, 7, 6, & 5 to help developers debug their application.

1. Open your application's web.config file

2. Locate stdoutLogEnabled in the web.config file.

<aspNetCore processPath=".\example.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />

3. Change stdoutLogEnabled to true.

<aspNetCore processPath=".\example.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />

4. Create a folder in your public_html folder called logs and enable write permissions on the folder.

5. Run your application again and any detailed errors will be logged in public_html\logs\stdout_*.log file.


Back To Hosting Knowledgebase Menu

Windows Dedicated and Hyper-V Servers

Fully managed or self-managed, from our own solar powered data centre.

Web Wiz® is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.

Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, €, prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz® Ltd. All rights reserved.