ASP.NET Core IIS Error 503 - Service Unavailable

Author: Sebastian Riesner, Published: 5/29/2019 9:10 AM

One of my webservers is running multiple web applications. Out of nowhere, they all stopped working, only showing Service Unavailable - HTTP Error 503. The service is unavailable when I tried to open them.

The 503 Error, which showed up, when I tried to open the web applications.
The 503 Error, which showed up, when I tried to open the web applications.

First, I went to the Event Viewer -> Windows Logs -> System and found Event 5059, WAS - Application pool AspNetCore has been disabled. Windows Process Activation Service (WAS) encountered a failure when it started a worker process to serve the application pool.

Windows Event Viewer Event 5059
Windows Event Viewer Event 5059

After some further investigating, I found out that the application pool, which was hosting the web applications, was in Stopped state. I could restart it, but it stopped again as soon as I made a request to one of the affected web applications.

The Application Pool in the IIS Console is stopped.
The Application Pool in the IIS Console is stopped.

I desperately created a new application pool with the same parameters, as the old one had. Then I went to every single web application and changed the application pool to the new one. This is possible to do through the IIS Manager by clicking the specific web application and then on the right side an "Basic Settings...". There you click the "Select..."-button and select the new application pool from the dropdown-menu.

Selecting the new application pool for the web application.
Selecting the new application pool for the web application.

I was then able to start und run the web application again. Something had destroyed the old application pool, which I couldn't find out, yet.

Webserver configuration:

  • Hosted V-Server with Windows Server 2016 Datacenter
  • IIS 10.0.14393.0
  • ASP.NET Core 2.2.3