How to diagnose .NET Core website/application errors

If errors are encountered on your .Net Core application hosted on our ASP .NET Core Windows hosting packages after deployment and you have ensured that all files have been correctly uploaded into your wwwroot folder and the correct application pool is in use please follow the below steps to enable debugging for your .Net Core application.

A good option to check before enabling debugging for the site is to ensure that the correct handlers are being used within your web.config file. 

 

Web.Config Requirements.

  • Within your Solid Control Panel navigate to Hosting Space Menu.
  • Navigate to File Manager.
  • Click on your Website.

absolutehosting.co.za solid control panel file manager

  • Navigate to the wwwroot folder.
  • Locate the web.config file.
  • Click on the pencil in page icon to edit the file.

absolutehosting.co.za - webconfig edit

  • In the Edit File screen :
  • Ensure that the line modules= is set to"AspNetCoreModuleV2" (modules="AspNetCoreModuleV2")
  • Ensure that the line hostingModel= is set to "InProcess" (hostingModel="InProcess")
  • Click on the green Save button.

 

Reload the website within your browser and the website should now load.

If this has not corrected the issue follow the below steps to enable debugging on the website and generate the error logs you can use to diagnose the issue.

 

Enabling Debugging.

Before creating the log folder, where new log files will be created when browsing the website, you will need to enable debugging within your web.config file. 

  • Within your Solid Control Panel navigate to Hosting Space Menu.
  • Navigate to File Manager.
  • Click on your Website.

  • Navigate to the wwwroot folder.
  • Locate the web.config file.
  • Click on the pencil in page icon to edit the file.

absolutehosting.co.za - webconfig edit

  • In the Edit File screen
  • Find the line stdoutLogEnabled="false" and change this to stdoutLogEnabled="true"

 

You will now need to create the "logs" folder and ensure that the correct permissions are set. 

 

  • Within your Solid Control Panel navigate to Hosting Space Menu.
  • Navigate to File Manager.
  • Click on your Website.

  • Navigate to the wwwroot folder.
  • Click on the "create folder" button
  • Create a new folder called logs.
  • click on the lock icon to the right of the newly created logs folder to set the required permissions for the folder.  
  • enable read and write permissions for the domain name and network service options then click on the green "set permissions" button. 

Absolutehosting.co.za-logs-permissions

 

If debugging has been correctly enabled and permissions for the logs folder have been correctly set, browsing the website will generate a new file within the created logs folder that you are able to view and use to debug the issues being faced by your .Net Core application. 

 

  • .net core, .net core hosting, error logging, error
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to reset or change your email password from SolidCP

Follow the steps below to change an email password that is hosted on our Windows SSD Hosting...

Email Password Complexity Requirements

For your security and the security of other users hosted on our Windows SSD Web Hosting...

How to Set Website Permissions + Write Permissions

How to set website write permissions using the Windows Hosting Control Panel. Log into the...

URL redirect rule to redirect all website traffic from http to https

This knowledgebase article applies to Windows Hosting only, below are the Linux instructions...

How to connect to your MSSQL databases from your website + using SQL Server Management Studio

How to remotely connect to a Microsoft SQL Database Preamble : In order to connect to a...