Troubleshooting - An error occurred while starting the application
An application startup error indicates that a critical failure occurred while the web server attempted to initialize the ThoughtFarmer application. Because this is a generic catch-all wrapper error, the underlying root cause can vary.
This guide walks you through enabling diagnostic logging to capture the specific exception details required by the ThoughtFarmer Support team to resolve the issue.
Enable stdout logging
To capture the specific runtime error, you must modify the application's configuration file to direct the .NET Core hosting bundle to output standard console logs to disk.
- Log in to the web server and launch Internet Information Services (IIS) Manager.
- In the left-hand Connections pane, expand the Sites folder. Right-click your ThoughtFarmer site and select Explore. This opens the site's physical root directory in File Explorer.
- Locate the web.config file in this directory.
- Open Notepad (or your preferred text editor) as an Administrator, and open the web.config file.
- Locate the <aspNetCore> configuration tag. It will look similar to this:
<aspNetCore processPath="dotnet" arguments=".\ORC.TF.Web.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="true" requestTimeout="00:10:00" shutdownTimeLimit="10" hostingModel="InProcess">- Change the stdoutLogEnabled attribute from "false" to "true". Your modified line should read exactly as follows:
<aspNetCore processPath="dotnet" arguments=".\ORC.TF.Web.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="true" requestTimeout="00:10:00" shutdownTimeLimit="10" hostingModel="InProcess">- Save and close the web.config file.
- Return to the File Explorer window opened in Step 2. Verify if a folder named logs exists. If it does not, create a new folder named exactly logs.
Reproduce the error and gather logs
- Open a web browser, navigate to your ThoughtFarmer intranet URL, and refresh the page to reproduce the startup error. This action forces the application to attempt initialization and write the error details to disk.
- Open the newly created logs folder on the server.
- Locate the log file matching the naming convention stdout_[timestamp]_[pid].log (for example: stdout_20260615035328_28704.log).
- Open the file to view the specific exception details.
- Copy the contents of this log file and attach them to your open ticket with the ThoughtFarmer Helpdesk for further analysis.
Critical post-troubleshooting requirement
Once you have successfully captured the log data, you must revert the stdoutLogEnabled attribute back to "false".
Leaving diagnostic stdout logging enabled indefinitely in a production environment will continuously consume server disk space and can negatively impact application performance.
Disable stdout logging
- Open the web.config file in Administrator mode again.
- Locate the <aspNetCore> element and change the stdoutLogEnabled attribute back to "false":
<aspNetCore processPath="dotnet" arguments=".\ORC.TF.Web.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="true" requestTimeout="00:10:00" shutdownTimeLimit="10" hostingModel="InProcess">- Save and close the file to apply the changes.
Comments
0 comments
Please sign in to leave a comment.