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:
The update is very smooth, normally.
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=18.104.22.168, 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 22.214.171.124 by hand to 126.96.36.199:
<system.diagnostics> <sharedListeners> <add name="AzureLocalStorage" type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=188.8.131.52, 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.