ASP.NET MVC 4 with Windows Azure for Windows Phone 7, BlackBerry, Android & i-Os.

Though MVC 4 is still in developer preview , not released in RTM phase but there is cool staff of development of ASP.NET MVC 4 applications for desktop & Mobile with Windows Azure environment.

Since it’s always been a great experience with working of MVC with Windows Azure of rich web experiences in Cloud. So , Lets a Windows Azure application targeted for Mobile Smart devices (Windows Phone 7, BlackBerry 7 , i-Os, Android ) & deploy in Azure of Microsoft Data Centeres.

  • Let’s Create a new Windows Azure Application from Visual Studio & do not add any webrole to it as we will add our ASP.NET MVC 4 webrole with it . (P.S:  Those  who have already MVC4 Webrole Template installed in Windows Azure environment of Visual Studio , can go & take a MVC 4 Web Role Template).
  • For those who dont have MVC 4 WebRole Template for Windows Azure environment for Visual Studio can simply create the blank Azure Project as we will add ASP.NET MVC 4 web application project later.

  •  Check out the  WebRole sections, Click OK as we dont need to take WebRole from default WebRole options.

  •  Next , Check out the Blank Azure Project created in your Visual Studio solution with ServiceConfiguration.cscfg & ServiceDefinition.csdef files.
  • Now , Time to add a new ASP.NET MVC 4 Project from Visual Studio , so on the solution explorer right click the solution -> add -> new project -> choose New ASP.NET MVC 4 Web Application.

  • Next , Add the ASP.NET MVApplication C 4 application with Windows Azure Project . To do this , right click on Roles of your Windows Azure project & select Web Role Project in Solution . Redirect to Associate Web Role Project in Solution Window  & Click OK.

        Check the ASP.NET MVC 4 web application has been added as webrole in Windows Azure Roles.

    • Click OK to add the existing MVC 4 solution with Windows Azure Application.
  •  Now it’s time to run the Windows Azure Project with ASP.NET MVC 4 in development fabric. So hit F5.

  •  Now time to test the application in Mobile Devices so , test in Windows Phone as this MVC 4 web application project has been enabled for Mobile apps.

  •  Associate Page View 

  •  Now , Test it in Android 2.2 & Android 3 Tablet device.

  •  Android 3.0 Tablet View for ASP.NET MVC 4 Windows Azure Application.

  •  Run it on BlackBerry OS of BlackBerry 9800 device.

  •  So the Windows Azure Application with ASP.NET MVC 4 for mobile is ready for development fabric , so deploy it Azure VM & run it from cloud to mobile.




Troubleshooting:Windows Azure with WCF Webrole & Windows Phone Client:Could not load file or assembly ‘MyTodo.Web’/ ‘msshrtmi’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

While working with a project of  Windows Azure Toolkit Training Kit 2011 November update named Windows Phone 7 & Cloud, observed some issues while running the application Azure Development fabric. The Azure Project simply loads a WCF service webrole project in Begin , now while compiling in Azure Compute emulator it throws the following exception :

Similar Exception incorporated with ‘msshrtmi’.dll while connecting with dfservice. Possible solutions are :

  • Solutions: Check out the Debug platform (Any CPU/X86/X64/Itanium) in Build section of WCF Webrole property.
  • Make it out as X64 for 64 bit OS & x86 for 32 bit OS. Windows Azure itself hosts as 64bit OS in VM.
  • Unload the Webrole project from Solution & open the edit section of the project. Remove the Entry :
  • <PlatformTarget>Any CPU </PlatformTarget>

  • Next Reload the project & compile the project. If it again produces same error then try out the following steps:


  • Download Dependency Walker from :  & Choose your appropriate OS compatible version.
  • Check out if the msshrtmi.dll is present inside bin/debug folder of your webrole project , if yes then check in dependency checker the version of the .dll whether it’s x64 or x86.


If the version of the .dll is appropriate then try to stop the copying of msshrtmi.dll in bin/debug of your project by applying the following code in Build Event section of Proeject Property in your Webrole project.


cd $(TargetDir)  

del msshrtmi.dll

Save it  & compile the project.

Hope , this steps will help to remove the issues.

Debugging & TroubleShooting: Development Fabric Roles are busy,Certificate installation error in Windows Azure Toolkit for Windows Phone

As a part of Windows Azure Troubleshooting , it ‘s important to get Windows Azue roles as Busy, Aborted or Stopped in dev fabric.  Primary reasons are underlying behind the development error.

Cases of Staged environments or Production environment is quite different because in that case we need to troubleshoot the VM on which the instance is running.

For development fabric , there is a common error of getting Azure Roles get Busy, Aborted or Stopped. Such a case quite common for Windows Azure Toolkit for Windows Phone.

After installing Windows Azure Toolkit for Windows Phone, you might get a Project option in Visual Studio like this:

After that , you might get a prompt like this :

You can select default Storage account name & key or Use development Storage Emulator.

In Next screen , you will be prompted with the options to select Azure membership role or Use ACS account credentials.

If you select to create a new ASP.NET membership store in Windows Azure Tables. Then , the project loads & start F5 to dubug. But , you will see the Busy status of Windows Azure Roles & there is a issue in connecting the Azure instance with Windows Phone. check the storage emulator for endpoints addresses:

as over HTTPS on port 443 and HTTP on port 10080, both on IP address If it is running on a different port or IP address, stop the deployment, and exit the Windows Azure Compute Emulator.

Now , Try to install the certificate in Windows Phone , even its got installed but after it will throw exception as Azure Web Role got stuck in Busy state in dev fabric.

In development Fabric , Check the Role Status as Busy & Exception Details:


To fix this issue you need to remove users created with the old authentication method in the Windows Azure Storage tables used by the application. To do this, you can use a tool like to remove the old users in the PushUserEndpoints table (if you are using the Storage Emulator you can use other tools like the Azure Storage Explorer).

More hotFix are here:

Windows Azure Toolkit for Windows Phone

Developing Cloud applications with Windows Phone 7 is extremely powerful way of building enterprise apps & even it’s the future of all cloud-driven industry based applications.

  • In Windows azure platform training kit there are lots of examples shown on using ACS in Windows Phone 7 with Windows Identity Foundation, consuming oData & WCF services from SQL Azure database.
  • Windows Azure toolkit for windows Phone , IOS, Android builds the path easy & handles to produce the features without app coding.
  • The toolkit enables automatic featuring of Push Notifications (Raw, Tile, Toast) , handles direct messaging from Queue, Blobs, Tables in Azure & even interacting with your SQL Azure Databases from the applications running in Windows Phone/Android/i-Phone.
  • The toolkit was first launched on March 23rd, 2011 , with support WP7 now its version came out as 1.3 with support of WP7.1 RC.
The Installation:
  • The installation is based on .exe followed by running the Dependency Checker.
  • The dependency checker detects the necessary softwares installed on system.
  • Any missing prerequisites can be easily downloaded from the proper site.
  • install the software & check out new templates under visual studio 2010.
  • Start development by entering your windows azure storage ID & password.

This slideshow requires JavaScript.

%d bloggers like this: