System.Web.Hosting.IRegisteredObject.Stop Method

Requests a registered object to unregister.

Syntax

public void Stop (bool immediate)

Parameters

immediate
true to indicate the registered object should unregister from the hosting environment before returning; otherwise, false.

Remarks

The application manager will call the IRegisteredObject.Stop(bool) method to ask a registered object to unregister. During processing of the IRegisteredObject.Stop(bool) method, the registered object must call the HostingEnvironment.UnregisterObject(IRegisteredObject) method.

The IRegisteredObject.Stop(bool) method is first called with the immediate parameter set to false. The object can either complete processing, call the HostingEnvironment.UnregisterObject(IRegisteredObject) method, and then return or it can return immediately and complete processing asynchronously before calling the HostingEnvironment.UnregisterObject(IRegisteredObject) method.

If the registered object does not complete processing before the application manager's time-out period expires, the IRegisteredObject.Stop(bool) method is called again with the immediate parameter set to true. When the immediate parameter is true, the registered object must call the HostingEnvironment.UnregisterObject(IRegisteredObject) method before returning; otherwise, its registration will be removed by the application manager.

Requirements

Namespace: System.Web.Hosting
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0