Win Server 2008 + IIS 7 + MVC3: what to install to deploy applications

asp.net-mvciis-7windows-server-2008

I'm newbie at deployment.

I have OS Windows Server 2008 R2 on my server with IIS 7. I have folder with .Net MVC3 web application. I created new pool, set Framework 4.0 for it. I created new website, chose physical path 'E:/site' and bound it to domain name. Then I copied folder with my .Net MVC3 site into 'E:/site'. But if I try open mydomain.com it doesn't work as MVC3 application. Usual HTML-pages work only.

I guess, I should install some components or programs to make server run web site as MVC application. Serever has already:

  • MS .Net Framework 4 Client Profile;
  • MS .Net Framework 4 Extended;
  • MS Web Platform Installer 3.0.

Can anybody help me? What should I do else?

Best Answer

You can either install the MVC Framework on the server itself, or you can do a "bin deploy" of the required assemblies from within Visual Studio. This definitely works with Visual Studio 2010, because I've done it before - your mileage may vary with earlier versions.

To do a bin deploy, right click on your project in Visual Studio and select Add Deployable Dependencies. From the dialog, choose ASP.NET MVC (don't worry about the other options, this is all you need). This will create a folder in your project called _bin_deployableAssemblies with the necessary DLL's to run MVC stuff.

Do a deploy afterwards and it should work. If not, the full yellow screen of death error text would be very helpful.