Bin deploying ASP.NET MVC

Welcome to my site! It has been developed using ASP.NET MVC 2 beta (Which I intend to update as soon as the full release comes out), Subsonic 3.0 and a SQL 2005 DB. Ive written everything from scratch and Ive still got a lot to learn about the cool features that are available in the new ASP.NET MVC 2.

Bin Deploy ASP.NET MVC

So, I thought Id just detail some of the issues I encountered whilst setting up the site. On my local environment developing and setting up an ASP.NET MVC 2 app was a breeze. I was initially a bit worried about deploying my site to a hosting company and having it still work with the ASP.NET MVC 2 on it. My hosting company does provide an MVC 1 service which is great, but when I initially uploaded my site to the hosting provider I got an error asking for ASP.NET MVC version 2 dlls.

After some searching around I found this great article : http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx

Although this was orginally written within MVC 1 in mind, it worked perfectly for me with MVC 2. All the changes involved were including the following files with my deployment:

  • System.Web.Mvc
  • System.Web.Routing
  • System.Web.Abstractions

In order to fix this problem, right click in your Solution Explorer and then expand the references. Choose the required Dll's and set "copy local" to true. MVC Dll's System.Web.Abstractions

Finally, you can publish the application and it should work as expected! Visual Studio Publish

So, even if your hosting company doesnt have ASP.NET MVC installed it isnt a problem.