Thursday, September 13, 2012

Awesome Azure Diagnostics!

Just started working on diagnostics in azure and I can't help expressing  my happiness about the features it provides.

1) Errors and logs can be treated equally: Errors and traces and logs can all be logged as traces(advantage given below).

2) Tier wise tracing: You decide which layer should trace. Data layer , service layer Etc. This is done with Trace Switching.

3) Filter on Tier wise tracing:  Filter what needs to be traced. Errors,Information,Warning ,etc.

4) Transfer logs/traces to storages periodically with the help of Azure Diagnostics  library

5) Filter on Transfer : You decide what to Transfer (Errors,Information,Warning ,etc).

Easy to visualise architecture wise !  Easy to implement coding wise!

It is not over! This one is my favourite:

6) Runtime change of filtering and fetching: We usually put diagnostic related info in web.config. But by putting this in ServiceConfiguration.cscfg , we can trigger the changing event to reset the filtering and tracing.

Developers spend years amassing skills to become an architect but then they did not work on Azure!

 

Tuesday, September 11, 2012

Edit Azure config files in emulator

The deployment ID of Windows Azure can be see this by checking the development fabric UI from the system tray while the service is running. This will be a number like 177.

find the config file and update it and run this command:
csrun /update:NNN;ServiceConfiguration.cscfg

Tip: search 'ServiceConfiguration.cscfg' to find where the build has deployed the dlls.


 

Unit testing Azure components

You could run the emulator on [Assembly Initialise] of the test project.
ProcessStartInfo start = new ProcessStartInfo  
{                                              
    Arguments = "/devstore:start",                                              
    FileName = @"C:\Program Files\Windows Azure Emulator\emulator\csrun.exe"                         
}; 
 
 
for more these two links might helphttp://andrewmatthewthompson.blogspot.nl/2011/12/deploying-packages-to-azure-compute.html
to test storage : http://www.neovolve.com/post/2012/01/12/Integration-testing-with-Azure-development-storage.aspx


How to manually edit a azure config file in emulator : click here


 

Monday, September 3, 2012

ErrorCode < ERRCA0021>:SubStatus < ES0001>:Server collection cannot be empty

ErrorCode<ERRCA0021>:SubStatus<ES0001>:Server collection cannot be empty
This could be caused by incorrect configuration.
I was using caching preview and in my case it was a configuration error
  <dataCacheClients>
       <dataCacheClient name="default">
         <autoDiscover isEnabled="false" identifier="VideoDeals" />
       </dataCacheClient>
   </dataCacheClients>
I changed isEnabled to "true" and it worked!