Azure SDK 2.6 breaks system.diagnostics configuration

In our project we have several web roles and worker roles, all of them depending on the Azure SDK (..)

Recently we migrated our solutions to Azure SDK 2.6 but we noticed a nasty little issue: When updating the web.config, not always the system.diagnostics node is updated. It was sticking to version 2.2.

Updating seems easy, just right-click the role configuration, go to the properties menu and a simple dialog is shown:

azuresdk2-6-1

The update is very smooth, normally.

azuresdk2-6-2

And we noticed the migration of the standard trace listener went very well:

<system.diagnostics>
    <trace>
      <listeners>
        <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"          name="AzureDiagnostics">
          <filter type="" />
        </add>
      </listeners>
    </trace>  
</system.diagnostics>

 

But the sharedlisteners failed.

After deployment we got some errors regarding not referencing the Microsoft.WindowsAzure.Diagnostics dll’s.

Everything was checked and then we discovered a reference to the old version in the web.config diagnostics section. We had to change 2.2.0.0 by hand to 2.6.0.0:

<system.diagnostics>
    <sharedListeners>
      <add name="AzureLocalStorage" type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
        <filter type="" />
      </add>
    </sharedListeners>
    <sources>
      <source name="TopecSecurityTokenService" switchValue="Verbose">
        <listeners>
          <add name="AzureLocalStorage" />
        </listeners>
      </source>
    </sources>
</system.diagnostics>

This seems rather trivial but if tracing fails, there is nothing traced 😉 In the end we had some luck, the development environment exposed the error to the browser.

 

 

Advertenties

One thought on “Azure SDK 2.6 breaks system.diagnostics configuration

Reacties zijn gesloten.