AzureFeeds - All your Azure feeds in one place.

Sponsors

Wednesday, October 29, 2008

ASP.Net MVC Projects running on Windows Azure

by jnak via Cloudy in Seattle on 10/29/2008 4:59:00 AM

Strictly speaking, ASP.Net MVC projects are not supported on Windows Azure.  That is to say that we haven't spent the time to fully test all of the MVC scenarios when running on Windows Azure. 

That said, for the most part, they do work, just as long as you know what tweaks you need to make in order to get up and running.

I've attached a sample application that Phil and Eilon on the MVC team put together to help make it easier for you to get started.

If you don't use the sample, you would have to modify the MVC project file (which will be the Web Role) to add a couple of properties so that Visual Studio can identify it properly:

<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
{. . .}
    <RoleType>Web</RoleType>
    <ServiceHostingSDKInstallDir Condition=" '$(ServiceHostingSDKInstallDir)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting\v1.0@InstallPath)</ServiceHostingSDKInstallDir>
  </PropertyGroup>

You also need to make sure you set Copy Local = true on the MVC DLLs such as System.Web.Abstractions, System.Web.Mvc and System.Web.Routing because those assemblies are not available when running on Windows Azure and need to be deployed with the Service Package.

With these changes, the edit, build, debug, publish and deploy functionality will all work in Visual Studio with the Windows Azure Tools for Microsoft Visual Studio installed.

That said, it is still "use at your own risk".

Note: The sample has not been modified to use the Windows Azure ASP.Net provider (for example, the membership provider), stayed tuned.

The sample project is attached to this blog post.

email it!bookmark it!digg it!

Original Post: ASP.Net MVC Projects running on Windows Azure

Legal Note

The content of the postings is owned by the respective author. AzureFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on AzureFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us