title: DiagnosticsPlugin.exe Error: 0 : System.Exception: Couldn't encrypt the storage key. Thumbprint is null
body: <p>I am trying to configure Azure service Diagnostic on my Azure worker role (v2.5).
  I ran the following powershell command: </p>
  
  <pre><code>$storage_name = "xxxxxxx"
  $key = "srxxxxxxxxA+A25deaNn7zxS7+dc49qq7iXr57g=="
  $config_path="c:\azure profile\test.xml"
  $service_name="apidfdffddfng"
  $role="ApffdfdWorkerRole"
  $storageContext = New-AzureStorageContext -StorageAccountName $storage_name -StorageAccountKey $key 
  Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath $config_path -ServiceName $service_name -Slot Production -Role $role
  </code></pre>
  
  <p>I am getting following error when I checked the DiagnosticPlugin.log file in that azure worker role machine: </p>
  
  <pre><code>DiagnosticsPlugin.exe Information: 0 : [3/19/2015 5:09:00 PM] Private    setting is loaded
  DiagnosticsPlugin.exe Information: 0 : [3/19/2015 5:09:00 PM] Checkpoint file is presentC:\Resources\{a87df972-08a1-480d-7a47-68fe23705c65}\directory\63df6ac994f84878831af26f1cc71ec2.ApiHooksWorkerRole.DiagnosticStore\WAD0103\Configuration\Checkpoint.txt
  DiagnosticsPlugin.exe Information: 0 : [3/19/2015 5:09:00 PM] Will use local resource directory C:\Resources\{a87df972-08a1-480d-7a47-68fe23705c65}\directory\63df6ac994f84878831af26f1cc71ec2.ApiHooksWorkerRole.DiagnosticStore\WAD0103
  DiagnosticsPlugin.exe Error: 0 : [3/19/2015 5:09:00 PM] System.Exception: Couldn't encrypt the storage key. Thumbprint is null.
  at Microsoft.Azure.Plugins.Plugin.StandardConfig.EncryptKey(String key,  String thumbprint)
  at Microsoft.Azure.Plugins.Plugin.StandardConfig..ctor(String nameSpace, Int32 eventVersion, Int64 overallQuota, String accountName, String accountKey, String accountUri, String accountCertStore, Int32 retention, String thumbprint)
  at Microsoft.Azure.Plugins.Plugin.WadParser.Translate(String baseMaResourcePath, Int32 actualDiskQuota, String&amp; fullConfigFilePath)
  DiagnosticsPlugin.exe Error: 0 : [3/19/2015 5:09:00 PM] Failed to convert    WAD1.1 config to Monagent config format
  DiagnosticsPlugin.exe Information: 0 : [3/19/2015 5:09:00 PM]          
  DiagnosticPlugin.exe exit with code -108
  </code></pre>
  
  <p>Can someone help me in identifying where am I doing wrong?</p>
  
  <p><strong>Update ( 23/March/2015) :</strong> Now I have added a thumbprint into my powershell command which seems to resolve the first issue but now its not creating custom tables. Here is the new powershell command:</p>
  
  <pre><code>$storage_name = "xxxxxxx"
  $key = "srxxxxxxxxA+A25deaNn7zxS7+dc49qq7iXr57g=="
  $config_path="c:\azure profile\test.xml"
  $service_name="apidfdffddfng"
  $role="ApffdfdWorkerRole"
  $certificateThumbprint="792FXXXXCFA9EDC78973XXXXB031CE99"
  $storageContext = New-AzureStorageContext -StorageAccountName $storage_name -StorageAccountKey $key 
  Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath $config_path -ServiceName $service_name -Slot Production -Role $role -CertificateThumbprint $certificateThumbprint
  </code></pre>