Troubleshooting .NET 9 Application Errors Print

  • 0

Common HTTP Error Codes

HTTP 500.30 - ASP.NET Core App Failed to Start

Causes:

  • Application crashed during startup
  • Missing dependencies
  • Configuration errors

Solutions:

  • Verify Application Startup File is correct in Plesk
  • Check all files were uploaded
  • Validate appsettings.json syntax
  • Check database connection strings
  • Review stdout logs in Plesk

HTTP 500.31 - Failed to Load Runtime

Cause: .NET runtime not found

Solutions:

  • Verify app targets .NET 9.0
  • Contact support to confirm .NET 9 is installed
  • Try self-contained deployment

HTTP 502.5 - Process Failure

Cause: Application process crashed

Solutions:

  • Check logs for exceptions
  • Verify no startup errors
  • Check for missing dependencies

Enabling Detailed Errors

Enable stdout Logging:

Edit web.config:

<aspNetCore processPath="dotnet" 
            arguments=".YourApp.dll" 
            stdoutLogEnabled="true" 
            stdoutLogFile=".logsstdout" 
            hostingModel="inprocess" />
  1. Create a logs folder in your app root
  2. Reproduce the error
  3. Check log files in the logs folder
  4. Disable logging after troubleshooting!

View Error Details (Development Only):

Temporarily in Program.cs:

if (app.Environment.IsDevelopment())
{
    app.UseDeveloperExceptionPage();
}

Common Issues

Application Shows Old Version After Update

  • Restart application in Plesk .NET Core settings
  • Clear browser cache
  • Verify new files were uploaded

Static Files Not Loading

  • Check Document Root is correct
  • Verify app.UseStaticFiles() is in Program.cs
  • Ensure wwwroot folder was uploaded

Database Connection Fails

  • Use localhost as server (not your domain)
  • Verify credentials in Plesk Databases
  • Add TrustServerCertificate=True; to connection string

App Starts Then Crashes

  • Check for exceptions in startup code
  • Verify all configuration is valid
  • Check external service connections

Slow Application Startup

  • Review database connection on startup
  • Check for blocking calls in Program.cs
  • Consider lazy loading for heavy services

Self-Contained Deployment Issues

App Wont Start with SCD:

  • Verify correct runtime identifier (win-x64)
  • Check all runtime files were uploaded
  • Ensure executable permissions (contact support if needed)

Checking Application Health

Add health checks to your app:

// Program.cs
builder.Services.AddHealthChecks();

// Middleware
app.MapHealthChecks("/health");

Then visit yourdomain.com/health

Getting Support

When contacting support, provide:

  • Domain name
  • Exact error message
  • stdout log contents
  • Steps to reproduce
  • .NET version (9.0)

Was this answer helpful?

« Back