Blog Archives

Deploying ASP.Net MVC3 to Windows Azure

So the first question is can I run an ASP.Net MVC3 WebRole on Windows Azure?   The short answer is yes.  The long answer is, well long.  First off the tooling in Visual Studio 2010  does not directly support creating an ASP.Net MVC3 Webrole (pre SP1 at least, I haven’t beenable to install the SP yet so I can’t comment on the support with that installed, but I hear it will get better), so you have to do it manually.
To get things set up was pretty straight forward, just create your new ASP.Net MVC3 web application,
New ASP.Net MVC3 Application
and then add a new Windows Azure Project to the solution.
New Windows Azure Project
Now you will have to wire up the web role in your Azure Project.  To do this right-click on the Roles folder under your Azure Project and select Add | Web Role Project In Solution and select your project.
Assuming that you have done some work in your ASP.Net MVC3 Project and it is working and ready to deploy there is one more item you’ll need to address.   The Window Azure Hosted Services will not by default have all the assemblies you need to run your site.  To get around this you have a couple of options.  The way I did it was to make sure I had references to these assemblies (you may not since MVC apparently dynamically loads some of them at run time), and then for each one I went to properties and set CopyLocal to True.
Here is the list of assemblies I had to add.
  • System.Web.Mvc
  • Microsoft.Web.Infrastructure
  • System.Web.Razor
  • System.Web.WebPages
  • System.Web.WebPages.Razor
  • System.Web.Helpers
  • System.Web.WebPages.Deployment

Your list may be slightly different.  If you miss one you will get a “Yellow Screen of Death” .

Error Sample

Just add that assembly to your list and try again…

Good Luck!


Microsoft Releases ASP.NET MVC 3.0, IIS Express, SQL Server Compact Edition 4.0, WebMatrix and more…

About a week ago (January 13th, 2011) Microsoft released a slew of developer tools to the web.

IIS Express 7.5

This is the item I am most excited about.  IIS Express is a free version of IIS 7.5 that can be used by developers when building web site.  It’s somewhere between Cassini (the ASP.Net development server) and a full blown IIS 7.5 install.  It provides support for SSL, URL Rewriting, and other IIS 7.x modules, while remaining under a 5mb download and running under non-administrator accounts.  It runs on Windows XP and higher and will run side by side with a full IIS install or Cassini.

Visual Studio 2010 SP1 (currently in Beta) will add support in Visual Studio for setting IIS Express as your default development server.

You can download IIS Express 7.5 and run it without SP1 for Visual Studio if you wish, but you will need to manually start the server.

Related Blog Posts:

Scott Guthrie: Introducing IIS Express

Scott Guthrie: VS 2010 SP1 (Beta) and IIS Express


Asp.Net MVC 3.0 is a very large release including:

  • The new ‘Razor’ View Engine which minimizes the number of characters used in you mark-up when data binding.
  • Improved JavaScript support.
  • Improved Validation.
  • Partial page output caching.
  • Better support for Dependency Injection and IOC Containers.

Get your hands dirty by downloading ASP.NET MVC 3.0 and trying out some demos on


Nuget is a free, open source package manager that makes it easy for .NET developers to include open source libraries in any type of project from ASP.Net Web Forms to WPF.

Get the installer @ and get started using all that open source goodness like NUnit, NHibernate, Castle.Windsor, and more.

Get more info:

Scott Hanselman’s Blog

Scott Guthrie’s Blog