Troubleshooting .NET 11 Application Errors Print

  • net11, dotnet 11, errors, 500.31, 500.30, self-contained
  • 0

Common HTTP Error Codes

HTTP 500.31 - Failed to Load ASP.NET Core Runtime

Cause: The app was published framework-dependent, so IIS looks for a shared .NET 11 runtime on the server. The shared .NET 11 runtime is not on our servers yet. The stdout log usually says the framework Microsoft.AspNetCore.App or Microsoft.NETCore.App, version 11.0.x, was not found.

Solution: Publish the app as self-contained and upload it again:

dotnet publish -c Release -r win-x64 --self-contained true

In Visual Studio: Publish → Show all settings → Deployment mode: Self-contained, Target runtime: win-x64. Afterwards, processPath in web.config should be .\YourApp.exe, not dotnet.

HTTP 500.32 - Failed to Load the App's DLL

Cause: The app was published for a different processor architecture than the application pool (for example win-x86 or win-arm64).

Solution: Publish with -r win-x64 and upload the new files.

HTTP 500.30 - ASP.NET Core App Failed to Start

Cause: The runtime loaded, but your app threw an exception while starting.

Solutions:

  • Turn on stdout logging (below) and read the exception
  • Check that all files from the publish folder were uploaded
  • Make sure appsettings.json and appsettings.Production.json are valid JSON
  • Check your database connection strings (see Connecting .NET 11 Apps to MSSQL Databases)
  • New in .NET 11: if a BackgroundService fails, IHost.RunAsync now throws, so an exception in a background service can stop the whole app. Check background services in the log.

HTTP 500.19 - Internal Server Error (Configuration)

Cause: web.config is not valid XML or contains a setting IIS does not accept.

Solutions:

  • Upload the web.config your publish produced again
  • Check any manual edits for typos and unclosed tags

HTTP 502.5 - Process Failure

Cause: Only seen when hostingModel="outofprocess" is set: the app's process started and then exited.

Solutions:

  • Use stdout logging to find the exception
  • Check that the app was published self-contained for win-x64

Enabling Detailed Error Logging

To see why the app fails, turn on stdout logging for a short time:

  1. Create a logs folder in your app's root
  2. Edit web.config and find the <aspNetCore> element
  3. Set stdoutLogEnabled="true" and stdoutLogFile=".\logs\stdout"
  4. Reload the site to reproduce the error
  5. Open the newest file in the logs folder with Plesk File Manager

Example web.config (self-contained app)

<aspNetCore processPath=".\MyApp.exe"
            stdoutLogEnabled="true"
            stdoutLogFile=".\logs\stdout"
            hostingModel="inprocess" />

Important: Set stdoutLogEnabled="false" again when you are done. The log files keep growing while it is on.

Common Issues and Fixes

"The process cannot access the file" During Upload

  • The running app has its files locked. Upload app_offline.htm to the site root first, upload your files, then delete app_offline.htm.

Application Shows the Old Version After an Update

  • Recycle the pool: Websites & Domains → your domain → Dedicated IIS Application Pool → Recycle
  • Clear your browser cache
  • Check that the new files were uploaded to the right folder

web.config Changed to Use "dotnet"

  • If processPath was changed to dotnet (for example by pointing the Plesk .NET Core page at a .dll), the app needs the shared runtime and returns 500.31. Upload the web.config from your self-contained publish again.

Static Files Not Loading (CSS, JS, Images)

  • Check that the wwwroot folder was uploaded
  • Check that app.MapStaticAssets() or app.UseStaticFiles() is in Program.cs

Settings Behave Differently After Upgrading to .NET 11

  • In .NET 11, an empty string in a later configuration source now overrides a value from an earlier one. Check for empty values in appsettings.Production.json or environment variables.
  • See Microsoft's full list: Breaking changes in .NET 11

Getting Help

If the problem continues, open a support ticket with:

  • Your domain name
  • The exact error message and HTTP error code
  • Whether the app was published self-contained
  • The relevant lines from the stdout log

Official documentation: What's new in .NET 11


Was this answer helpful?

« Back