SALES: 1-800-867-1380

RoleInstanceDiagnosticManager Constructor

Updated: November 15, 2013

Initializes a new instance of the RoleInstanceDiagnosticManager class.

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

public RoleInstanceDiagnosticManager (
	string connectionString,
	string deploymentId,
	string roleName,
	string roleInstanceId



The connection string for the storage account.


The deployment ID.


The name of the role.


The role instance ID.

The RoleInstanceDiagnosticManager constructor creates an object that represents the diagnostic monitor for a role instance. The methods and properties of this class enable you to configure on-demand transfers and change the current configuration of a diagnostic monitor.

The following code snippet creates a RoleInstanceDiagnosticManager using this method:

// 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";
string roleName = "WebRole1";
string roleInstanceId = "WebRole1_IN_0";

RoleInstanceDiagnosticManager roleInstanceDiagnosticManager = new RoleInstanceDiagnosticManager(connectionString, deploymentId, roleName, roleInstanceId);

Development Platforms

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

Target Platforms

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft