[Supported in the .NET Framework 4.5.1 only]
Occurs when the worker process or application pool associated with this host has stopped listening for new requests and will eventually shut down.
Assembly: System.Web (in System.Web.dll)
When an application pool and its associated worker processes are being shut down by IIS, for example when an application pool has reached a scheduled recycle interval, IIS notifies the ASP.NET runtime that the application is shutting down and the worker process for the application pool stops listening for new requests. Applications that use long-running requests, for example SignalR applications, can listen for the event and gracefully shut down their long-running operations when IIS has initiated the shutdown of an application pool and its associated worker processes.
There are several design considerations that a developer must consider when implementing the event: