Skip to main content

Windows Azure: Automated Commandline Deployment woes

I was trying to automate the process of Azure deployment through command line. The Azure Powershell cmdlets make this job very easy.

I was facing some issues when deploying the Application on Azure using commandline( using CSPack + Azure cmdlets). Some of the features on the site were functioning, specifically those that depended upon Azure configuration files. The same worked with VS 2010 package and deployment.

I realized that the package I was creating with CSPack was different from what VS 2010 was creating.

The first step i took was to reproduce the issue on Dev Fabric.
I was luck enough to reproduce the same issue in Dev Fabric if i deployed the package file created using CSPack.
What i realized was that the WebRole class which should be called by framework whenever the Azure Framework initializes was not being called for some strange reason. I had called some initialization code such as SetConfigurationSettingPublisher in WebRole.cs.
This was causing call made later to fail.
I did some debugging for sometime before it just struck me that the CSPack has an argument that takes the Entry-Point Dll.
Once i provided the entry point dll argument to CSPack and deployed again things worked like a charm.

The take away from this exercise was
Azure requires us to provide Entry-Point DLL for a Worker Role but not for Web. But in case you create your own Entry Point class (deriving from RoleEntryPoint) do remember to register the assembly for the entry point class else the framework would take a default implementation.

Happy Coding

Comments

Popular posts from this blog

Caching Images downloaded from web on Windows Phone Isolated storage

I was helping on a Windows Phone application where the requirement was to cache the images the phone downloads on the isolated storage for offline viewing. I wanted a solution which was simple and as transparent as possible. While researching I found  someone wrote a Silverlight converter for loading images from isolated storage. Taking that as a base I created a converted which can Load image from web (http + https), and persist it to isolated storage. In case of network connectivity issues can load the same image from isolated storage. It does that by mapping the http url to a isolated storage location. In case the network is down and the image is neither there in cache, loads a default image, passed as parameter to converter. Here is the gist for the implementation. To use the converter Import the name space. Declare the converter as resource. Set the Image Source Property to use this converter like this 

AngularJS by Example - My new book on AngularJS

For some time now i have been blogging on my corporate blog instead of my personal one. But this is something that i should share on my personal blog too as it is big :) I have a book out there " AngularJS by Example "! Published by Packt this book targets beginners to intermediate audience. Head over to my blog post here to learn more about the book.  You can also checkout and buy the book on Packt website . Happy reading!

Integrating ASP.Net MVC with AngularJS

We recently released a Project Template for ASP.Net MVC and AngularJS here and here . I did a follow up post detailing how the project template has been setup and how to make AngularJS and MVC play well together on my company blog . If you are interested in understanding how the template works head over to my blog post and read it!