π ~1 min read
Table of contents
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

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'

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
Related Errors & Cross-Refs
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.