Dette indhold er ikke tilgængeligt på dit sprog, men her er den engelske version.
Occurs when a role instance is about to be stopped.
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
Theevent is used to run code when a role instance is being stopped. This event is raised after the role instance has been taken out of the rotation of the load balancer, but before the OnStop method is called. You can use this event to run code that is required for a role instance to shut down correctly. The event is not raised when the virtual machine of the role instance is rebooted.
The following code example shows how you can run code when the role instance is being stopped:
Return to top