Sunday, December 19, 2010

Installing a Production Server for ASP.NET MVC 2

Two days ago I was asked to help with a production server installation. In the customer environment they built an ASP.NET MVC 2 application which they wanted to deploy. I found a very excellent post that Jon Galloway wrote about this subject and used it in at customer. In the post I’ll summarize some of the options that I used when we installed the production server for ASP.NET MVC 2.

Web Platform Installer
I wrote about the WebPI in the past. This option is the best option for installing all the server components and not only ASP.NET MVC. It will require that you have a desktop access to the server (remote connection or direct access). At the customer this option didn’t work. For some reason the installation asked that a Visual Studio 2008 SP1 will be installed on the server. Since it is a production server the existence of VS is not necessary.

Bin Deployment
In this option you deploy all the MVC assemblies within your application. Phil Haack wrote about this option and you can explore his post from here. I didn’t like this option since I preferred that the server will have the relevant assemblies installed in it. Since there are other MVC applications in develop which will be hosted in the customer’s server we didn’t choose this option at the end (although they used it in the first place) .

AspNetMVC2 MSI installer
In this option you can download the installer for the ASP.NET MVC 2 and install it. Running the installer will install the MVC runtime along with MVC tooling. At the customer the MSI produced the same error that the WebPI raised. What we did was to open the MSI package and install only the runtime environment. To achieve that you can run from command line the following instruction:
AspNetMVC2_VS2008 /x:[your directory name]

Read more: Gil Fink on .Net