Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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 class DeploymentDiagnosticManager

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 (http://manage.windowsazure.com).
//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 (http://manage.windowsazure.com).
string deploymentId = "28267ed8caf3424eab3f0b01acdd7281";
// Create a DeploymentDiagnosticManager for the deployment.
DeploymentDiagnosticManager deploymentDiagnosticManager = new DeploymentDiagnosticManager(connectionString, deploymentId);


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

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

Community Additions

© 2015 Microsoft