DeploymentDiagnosticManager Class
Det här innehållet finns inte tillgängligt på ditt språk men här finns den engelska versionen,

DeploymentDiagnosticManager Class


Updated: November 15, 2013

Provides a class for managing the configuration of diagnostic monitors remotely.

Namespace:   Microsoft.WindowsAzure.Diagnostics.Management
Assembly:  Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)


public ref class DeploymentDiagnosticManager 

System_CAPS_pubmethodDeploymentDiagnosticManager(String^, String^)

Creates a new instance of the DeploymentDiagnosticManager class.


This API is obsolete. Specifies that the deployment diagnostic manager may use non-secure (HTTP) connections to communicate with the storage account.


(Inherited from Object.)


(Inherited from Object.)


(Inherited from Object.)

System_CAPS_pubmethodGetRoleInstanceDiagnosticManager(String^, String^)

Returns a RoleInstanceDiagnosticManager for the specified role instance.


Returns the list of role instance diagnostic managers for the specified role.


Returns a list of IDs of active role instances that have a diagnostic monitor running.


Lists the set of roles which have successfully started at least one diagnostic monitor.


(Inherited from Object.)


(Inherited from Object.)


(Inherited from Object.)

The DeploymentDiagnosticManager class is used to get the diagnostics configuration of a deployment and its role instances that are currently running on Windows Azure. Once a deployment has been specified, you can use other classes and methods of the Microsoft.WindowsAzure.Diagnostics.Management namespace to modify the diagnostics and logging configuration for the deployment and its roles.

You can instantiate a DeploymentDiagnosticManager class from an application running in the cloud or on a local computer. The only requirement is that your application can access the Blob storage endpoint for the wad-control-container created by your role’s DiagnosticMonitor.

You create a DeploymentDiagnosticManager object for a deployment by specifying the storage location for your diagnostics configuration file, using the DiagnosticsConnectionString, and supplying the deployment ID of a hosted service.

For example, the following code snippet creates a new deployment diagnostic manager.

// Get the connection string. It's recommended that you store the connection string in your web.config or app.config file.
// Use the ConfigurationManager type to retrieve your storage connection string.  You can find the account name and key in
// the Windows Azure Management Portal (
//string connectionString = "DefaultEndpointsProtocol=https;AccountName=<AccountName>;AccountKey=<AccountKey>";
string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["StorageConnectionString"].ConnectionString;

// You can find the deployment ID, role name, and role instance ID in the 
// Windows Azure Management Portal (
string deploymentId = "28267ed8caf3424eab3f0b01acdd7281";

// Create a DeploymentDiagnosticManager for the deployment.
DeploymentDiagnosticManager deploymentDiagnosticManager = new DeploymentDiagnosticManager(connectionString, deploymentId);


This API is not supported in Azure SDK versions 2.5 and higher. Instead, use the diagnostics.wadcfg XML configuration file. For more information, see Collect Logging Data by Using Azure Diagnostics.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2015 Microsoft