Trace in azure

Every role in a Windows Azure Service has a default implementation for starting the diagnostics. How to read the diagnostics was not directly clear to me.
By dumping the diagnostic logs to your storage service in set intervals they become available to read with a tool like Cloud Storage Studio, but also with Visual Studio 2010. The logs are dumped into a Azure Table and can be queried.trace line in diagnostics table
Below is a small peace of code that dumps the diagnostic logs every 15 seconds:

DiagnosticMonitorConfiguration config = DiagnosticMonitor.GetDefaultInitialConfiguration();
config.Logs.ScheduledTransferPeriod = TimeSpan.FromSeconds(15.0);
DiagnosticMonitor.Start("DiagnosticsConnectionString", config);
Posted in Development | Leave a comment

Sqlite

The next hurdle in my Windows Azure project was the missing support for Sqlite. I needed to add these lines to the configuration to get it:

<system.data>
 <DbProviderFactories>
  <remove invariant = "System.Data.SQLite" />
  <add name         = "SQLite Data Provider"
       invariant    = "System.Data.SQLite"
       description  = ".Net Framework Data Provider for SQLite"
       type         = "System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
 </DbProviderFactories>
</system.data>

But what about the type? Azure needs the fullname. I used reflector to get it. http://reflector.red-gate.com/download.aspx 
Note: Azure needs the x64 assembly, so package it for deployment.

Posted in Development | Leave a comment

Cloud Storage Studio

Working on a Windows Azure project I’m planning to use the CloudDrive. After creating the virtual hard disk the problem started. Nothing but errormessages. After a short google seach I found this site http://www.cerebrata.com/Products/CloudStorageStudio/Default.aspx. Cloud Storage Studio enables you to upload the special PAGE BLOB type to a container. In my previous tools the other type was used.
Cloud Storage Studio can be downloaded and evaluated for 30 days. I will post my experiences here.

Posted in Tooling | 2 Comments