Geeks With Blogs
IUnknown Windows Azure mumblings of IUnknown

The Development Fabric has playing Boon or Bane for quite some time with us Azure developers. While the elevated privileges it runs under is still an unresolved issue, with a few things believed to work under the DevFab would inevitably fail in the cloud.

While MS is still working on a better DevFab. We have other issues to take care of. Oftentimes we are faced with a dead Development Fabric and would love our code to deal with it. Its time we tamed it.

The Windows Azure SDK contains the ServiceHosting Tools which can be used for some nifty automation of the DevFab. To use this, simply add a reference to the C:\Program Files\Windows Azure SDK\v1.0\bin\Microsoft.ServiceHosting.Tools.dll.

 

The following code can be used to check Development Storage (and Fabric)'s running state, or start them programatically:
 

                  DevStore ds = new DevStore();

                  // IsRunning checks whether the service is running.

                  if (!ds.IsRunning())

                  {

                   // EnsureRunning will try to start the service if it's not running. The parameter is immaterial

                       ds.EnsureRunning(1000);

                  }

                  DevFabric df = new DevFabric();

                  if (!df.IsDevFabricRunning())

                  {

                        df.EnsureDeveloperFabricRunning();

                  }

I am sure we can come up with more interesting stuff that can be done with the ServiceHosting.Tools, lets save it for some other date. :)

Posted on Friday, January 29, 2010 10:41 PM | Back to top


Comments on this post: Check for Azure Devlopment Fabric and start if not started already

# re: Check for Azure Devlopment Fabric and start if not started already
Requesting Gravatar...
So can we safely say that DevStore is a programmatic alternative to DSInit? Or is it rather an invocation of the same?? Oh and the DevFabric thing seems cool too!! Anyways nice post...waiting for more.....:) !!
Left by Tinu on Feb 02, 2010 8:58 AM

# re: Check for Azure Devlopment Fabric and start if not started already
Requesting Gravatar...
Not exactly, Tinu the correct alternative to DSInit is not in sight yet. I am trying to tinker about with Microsoft.WindowsAzure.DevelopmentStorage.Store.dll
and DevelopmentStorage.Utilities, will update here once I have something concrete in hand.

I'd also love to init my the DevStore with my own DB connectionstring if thats what you are hinting at :).

Left by Sarang on Feb 02, 2010 10:51 AM

# re: Check for Azure Devlopment Fabric and start if not started already
Requesting Gravatar...
Thank for the info - it's really helpful! This technique really helps for unit testing functionality related to the Azure storage!
Left by Tishon on Sep 13, 2010 12:57 PM

Your comment:
 (will show your gravatar)


Copyright © Sarang | Powered by: GeeksWithBlogs.net