Checklist
OWA and ECP HTTP 500 checklist
Based on the article: OWA and ECP HTTP 500 errors on Exchange Server: usual causes and how to tell them apart · 5 min read
An HTTP 500 from Outlook on the web or the Exchange admin center tells you that something failed, not what. The same status code comes from half-installed updates, missing configuration files, expired certificates and crashing application pools. In this post I'll show how to find which side of the proxy failed, match what you see to the usual causes, and apply the fix that belongs to it.
Symptoms to confirm
OWA shows its error page, and ECP shows an ASP.NET error, typically:
Something went wrong
Your request couldn't be completed. HTTP Status code: 500
Server Error in '/ecp' Application.
Could not load file or assembly 'Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.- After an interrupted installation:
something went wrongwithSorry, we can't get that information right now. Please try again later. If the problem continues, contact your helpdesk. - Sign-in never completes or the browser reports a redirect limit, and the Application log has Event ID 1003 from the front-end HTTP proxy with
System.NullReferenceExceptionatMicrosoft.Exchange.HttpProxy.FbaModule.ParseCadataCookies. - ASP.NET Event ID 1309 warnings ("An unhandled exception has occurred") for
/owaor/ecp.
Likely causes
Every OWA or ECP request crosses two IIS sites.
- A security update installed without elevation. Double-clicking the
.mspon a server with UAC enabled can leave files and configuration inconsistent, so OWA and ECP can't load Exchange assemblies. - A missing
SharedWebConfig.configinClientAccess(back end) orFrontEnd\HttpProxy(front end), typically after setup was interrupted. - Certificates. An expired Auth (OAuth) certificate breaks forms-based sign-in on the front end; a missing certificate on the back-end 444 binding stops proxying.
- Application pools and config files. A crashing pool, or a
web.configIIS can't parse (status 500.19).
Checklist
- 1
Find out which side failed
Reproduce the error and note the time. OWA's error page details show
X-FEServerandX-BEServer, the servers that handled the request.powershell$log = "u_ex$((Get-Date).ToUniversalTime().ToString('yyMMdd')).log" foreach ($site in 'W3SVC1','W3SVC2') { Select-String -Path "C:\inetpub\logs\LogFiles\$site\$log" -Pattern '/(owa|ecp)/.* 500 \d+ \d+ \d+$' | Select-Object -Last 5 | ForEach-Object { "$site $($_.Line)" } }- 500 only in W3SVC1: the front end failed or couldn't reach the back end (Auth certificate, the HttpProxy
SharedWebConfig.config, the 444 binding). - 500 in W3SVC2: the application on the back end failed (non-elevated update, the ClientAccess
SharedWebConfig.config, app pool). - Sub-status 19: a configuration file problem.
- 500 only in W3SVC1: the front end failed or couldn't reach the back end (Auth certificate, the HttpProxy
- 2
Match what you see to the cause
What you see Likely cause Go to Could not load file or assembly 'Microsoft.Exchange.Common...'right after an SUUpdate installed without elevation Step 3 Sorry, we can't get that information right nowafter an interrupted installMissing SharedWebConfig.configStep 4 Sign-in loop, redirect limit, Event 1003 ParseCadataCookiesExpired Auth certificate Step 5 Blank page, HttpEvent 15021 for 0.0.0.0:444Back-end binding Step 5 HTTP 503 or sub-status 500.19 Application pool or config file Step 6 - 3
Repair a non-elevated security update
Open Command Prompt with Run as administrator, run the full path of the
.msp, and restart when it finishes. If OWA or ECP still fail, rebuild the virtual directory files and configuration from an elevated Exchange Management Shell, reset IIS and restart the server (Microsoft's article also covers repairing ECP's bin search paths):powershellcd (Join-Path $env:ExchangeInstallPath 'Bin') .\UpdateCas.ps1 .\UpdateConfigFiles.ps1 iisreset - 4
Regenerate a missing SharedWebConfig.config
Check both locations with
Test-Path (Join-Path $env:ExchangeInstallPath 'ClientAccess\SharedWebConfig.config')and the same forFrontEnd\HttpProxy\SharedWebConfig.config. For whichever is missing, run the matching line from an elevated command prompt, theniisreset:cmdcd /d "%ExchangeInstallPath%\bin" DependentAssemblyGenerator.exe -exchangePath "%ExchangeInstallPath%\bin" -exchangePath "%ExchangeInstallPath%\ClientAccess" -configFile "%ExchangeInstallPath%\ClientAccess\SharedWebConfig.config" DependentAssemblyGenerator.exe -exchangePath "%ExchangeInstallPath%\bin" -exchangePath "%ExchangeInstallPath%\FrontEnd\HttpProxy" -configFile "%ExchangeInstallPath%\FrontEnd\HttpProxy\SharedWebConfig.config" - 5
Check the Auth certificate and the back-end binding
powershell$thumb = (Get-AuthConfig).CurrentCertificateThumbprint Get-ExchangeCertificate -Thumbprint $thumb | Format-List Subject, NotAfter, Status netsh http show sslcert ipport=0.0.0.0:444If the Auth certificate has expired or isn't found, renew it as described in renewing the SAN and Auth certificates; the CSS-Exchange script MonitorExchangeAuthCertificate.ps1 can also do it. If the 444 binding has no valid certificate, follow fixing the Exchange Back End 444 binding.
- 6
Application pools and config files
powershellImport-Module WebAdministration Get-ChildItem IIS:\AppPools | Where-Object Name -like 'MSExchange*' | Format-Table Name, State Start-WebAppPool -Name MSExchangeOWAAppPool # a pool that is Stopped Restart-WebAppPool -Name MSExchangeECPAppPool # recycle a running poolA stopped pool usually produces HTTP 503 rather than 500. If a pool keeps stopping, IIS rapid-fail protection has disabled it after repeated crashes; the WAS events in the System log and the 1309 events explain why.
Verify
- OWA and ECP load for mailboxes on every server; test each one directly, for example
https://ex01.contoso.com/owa. - New IIS log lines for
/owaand/ecpshow 200 or 302, not 500. - No new 1309 or 1003 events in the Application log.
Get-HealthReport -Identity EX01 | Where-Object { $_.HealthSet -like 'OWA*' -or $_.HealthSet -like 'ECP*' } | Format-Table HealthSet, AlertValueshowsHealthyonce the probes have run.
Key takeaways
- Read the error text first; it usually names the cause.
- Work out whether the front end or back end failed before changing anything.
- Install security updates from an elevated prompt and run the Health Checker afterwards.
- Keep the Auth certificate and the 444 binding healthy; problems with either only show up when users try to sign in.