Occurs before a change to the service configuration is applied to the running instances of a role.
Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
Public Shared Event Changing As EventHandler(Of RoleEnvironmentChangingEventArgs)
The Changing event and the Changed event are used together to identify and manage configuration changes to the service model. By using the Changing event, an instance can respond to a configuration change in one of the following ways:
Accept the configuration change while it is running, without going offline.
Set the Cancel property of RoleEnvironmentChangingEventArgs to true to take the instance offline, apply the configuration change, and then bring the instance back online.
By using the Cancel property, you can ensure that the instance proceeds through an orderly shutdown sequence and is taken offline before the configuration change is applied. During the shutdown process, Windows Azure raises the Stopping event, and then runs any code in the OnStop method.
The following code example shows how to apply the configuration changes after the role instances are restarted:
No code example is currently available or this language may not be supported.
This event occurs after the change has been submitted to Windows Azure but before the changes have been applied to each running role instance.
Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012