Editare

Partajați prin


IStopListeningRegisteredObject Interface

Definition

Listens for GL_STOP_LISTENING notifications from IIS.

public interface class IStopListeningRegisteredObject : System::Web::Hosting::IRegisteredObject
public interface IStopListeningRegisteredObject : System.Web.Hosting.IRegisteredObject
type IStopListeningRegisteredObject = interface
    interface IRegisteredObject
Public Interface IStopListeningRegisteredObject
Implements IRegisteredObject
Implements

Remarks

You can implement the IStopListeningRegisteredObject interface by passing an object to the RegisterObject method. The passed object listens for GL_STOP_LISTENING notifications from IIS. You can call this implementation when ASP.NET receives a GL_STOP_LISTENING notification from IIS, which signals that IIS is no longer listening for new requests for this application. The web server can allow requests that are in progress to run to completion. If your application processes long running requests, you might want to have the application listen for these IIS notifications to gracefully wind down the request. The StopListening method contrasts with the Stop method, which signals immediate application shutdown.

Methods

Stop(Boolean)

Requests a registered object to unregister.

(Inherited from IRegisteredObject)
StopListening()

Stops listening for new requests.

Applies to

Thread Safety

Instance members of this type are not guaranteed to be thread safe. The StopListening() method can be called at any time, including while a call to another method (such as Stop(Boolean)) on this same object is executing or while calls to other objects' StopListening() methods are executing. Because the execution of these methods is multithreaded, there is an interval in which the StopListening() method might be called even after a call to UnregisterObject(IRegisteredObject) has completed.