Affected versions: Windows Server 2019

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution β€” Primary Fix
  7. Solution β€” Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Web applications intermittently return 500 errors and recycle loops disrupt user sessions.

Environment & Reproduction

IIS 10 on Windows Server 2019 with recent app deployment or runtime patching.

Get-WebAppPoolState -Name 'DefaultAppPool'
Get-WinEvent -LogName Application -MaxEvents 80

Root Cause Analysis

Unhandled CLR exceptions, mismatched runtime versions, or memory limits trigger repeated pool termination.

Quick Triage

Confirm failing app pool identity, runtime, and recent deployment changes.

%windir%system32inetsrvappcmd list apppool /text:name,state

Step-by-Step Diagnosis

Correlate WAS/W3SVC events with application exceptions and worker process crash timestamps.

Get-WinEvent -LogName System -MaxEvents 80 | Where-Object ProviderName -in 'WAS','W3SVC'
Get-ChildItem C:inetpublogsLogFiles -Recurse | Sort LastWriteTime -Descending | Select -First 5
Illustrative mockup for windows-server-2019 β€” terminal_or_powershell
IIS app pool diagnostics β€” Illustrative mockup β€” Progressive Robot

Solution β€” Primary Fix

Set correct .NET CLR version, adjust rapid-fail protection thresholds, and recycle after deploying fixed binaries.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Import-Module WebAdministration
Set-ItemProperty IIS:AppPoolsMyAppPool -Name managedRuntimeVersion -Value 'v4.0'
Restart-WebAppPool -Name 'MyAppPool'
Illustrative mockup for windows-server-2019 β€” event_or_log_viewer
Application and WAS events for pool crashes β€” Illustrative mockup β€” Progressive Robot

Solution β€” Alternative Approaches

Use dedicated pool identity and isolate app into separate site to reduce blast radius.

Set-ItemProperty IIS:AppPoolsMyAppPool -Name processModel.identityType -Value ApplicationPoolIdentity

Verification & Acceptance Criteria

App pool remains Started and error rate falls to baseline during load test.

Get-WebAppPoolState -Name 'MyAppPool'
Invoke-WebRequest http://localhost/health -UseBasicParsing

Rollback Plan

Redeploy last known good package and restore previous pool settings if regression appears.

appcmd add backup pre-change
appcmd restore backup pre-change

Prevention & Hardening

Automate pre-prod smoke tests and capture crash dumps for recurrent faults.

procdump -ma -e w3wp.exe C:Dumps

Often accompanied by Event ID 5011 and application-specific dependency load errors.

Related tutorial: View the step-by-step tutorial for Windows Server 2019.

View all Windows Server 2019 tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Microsoft Learn: IIS troubleshooting and ASP.NET hosting guidance.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β€” we respond within one business day.