Server installation options for ASP.NET MVC 2 - Jon Galloway

Server installation options for ASP.NET MVC 2

I’ve answered several questions about installing ASP.NET MVC 2 on a server lately, and since I didn’t find a full summary I figured it was time to write one up. Here’s a look at some of the top options:

  • WebPI
  • Bin deploy
  • Run the full AspNetMVC2_VS2008.exe installer
  • Command-line install with aspnetmvc2.msi

WebPI

WebPI has quickly become my favorite way to install Microsoft web platform software (including development tools) on my development machine, and it’s a great option for installing on the server as well. I like WebPI for a lot of reasons – here are the top three:

  • It’s a tiny download (less than 2 MB)
  • It figures out which dependencies you need and which you already have installed, so you get the smallest download and fastest install possible
  • It’s one place to go to get all the new releases

So if you have desktop access to the server, probably the best option is to install ASP.NET MVC 2 via WebPI.

Bin Deployment

ASP.NET MVC was designed so you can use it without needing install permissions, e.g. working with a hosting provider who didn’t have ASP.NET MVC installed. Phil Haack wrote up instructions for Bin Deploying an ASP.NET MVC 1.0 application, and it’s only gotten easier since then. If your server has ASP.NET 4 installed, you’ll just need to set the reference to System.Web.Mvc to “Copy Local”:

Bin Deploy for System.Web.MVC

If you’re running on .NET Framework 3.5 SP1, you’ll need to include System.ComponentModel.DataAnnotations.dll (by setting it to Copy Local as well):

  • System.ComponentModel.DataAnnotations.dll
  • System.Web.Mvc.dll

And if you don’t have .NET Framework 3.5 SP1, you’ll also need to include System.Web.Abstractions.dll and System.Web.Routing.dll, so the full list to Bin deploy ASP.NET MVC 2 on .NET Framework 3.5 without SP1 is:

  • System.ComponentModel.DataAnnotations.dll
  • System.Web.Abstractions.dll
  • System.Web.Mvc.dll
  • System.Web.Routing.dll

For a full walkthrough on this, see Phil’s blog post.

Run the full AspNetMVC2_VS2008.exe installer

The AspNetMVC2_VS2008.exe installer installer is available from Microsoft Downloads at the following (quite memorable) URL: http://www.microsoft.com/downloads/details.aspx?FamilyID=c9ba1fe1-3ba8-439a-9e21-def90a8615a9

I’ll confess that I sometimes forget GUIDs, though, so I always just browse to http://asp.net/mvc and click on the Installer link near the top:

ASP.NET MVC Installer link

The installer is named AspNetMVC2_VS2008.exe, but it doesn’t require you to have Visual Studio 2008 (or any version of Visual Studio) installed, so it’s just fine to run it on a server. According to Jacques, who works on the installer: On a machine that doesn’t have VSTS/VWD installed, the EXE will autodetect this and only install the runtime component.

There are a few reasons you may not want to use this, though:

  • The installer shows a wizard that makes you click through a few steps. You might want to set up a silent / scripted install so you can include it as part of your server build process.
  • If the server happens to have VWD or VSTS installed (not a good idea usually, but it’s your server), the installer will also install the MVC tooling. You might not want that.

In those cases, you can do a scripted install with aspnetmvc2.msi.

Scripted install with aspnetmvc2.msi

There’s no direct download link for aspnetmvc2.msi; it’s included in AspNetMVC2_VS2008.exe. The good news is that AspNetMVC2_VS2008.exe is a self-extracting EXE, so you can either open it up with some archive utilities. Apparently it opens with WinRAR, but doesn’t open in either Windows Explorer, and 7-Zip just shows the resource information rather than the actual contents.

None of that’s a problem, though, because it’s a self-extracting exe. That means you can pass a –extract (or –x for short) argument at the command-line to extract it:

AspNetMVC2_VS2008.exe –x

You can also specify an extraction directory, like this:

Extracting AspNetMVC2_2008.exe 

Note: I don’t know of a way to specify the extraction directory in a way that prevents the confirmation prompt from being displayed. Do you?

There are three nested directories inside of the result: mvcruntime, mvctoolsvs2008, and mvctoolsvwd2008. The runtime, not surprisingly, is in the mvcruntime directory.

aspnetmvc2.msi hiding inside AspNetMVC2.exe

aspnetmvc2.msi can be run via command-line, and you can pass additional arguments supported by msiexec. Passing /q will specify a quiet install, so no dialogs are displayed. When you’re doing that, you’ll probably want to log the output in case something goes wrong, and you can do that using the /l argument:

C:\Users\Jon\Downloads\AspNetMVC2\mvcruntime>msiexec /i aspnetmvc2.msi /q /l*v .\mvc.log

You can find out more about Windows Installer (msiexec) command-line switches on MSDN, or you can just run msiexec /? to show the help.

You can drop the MVC_SERVER_INSTALL

The ASP.NET MVC 1.0 installer had an additional switch for server installation: MVC_SERVER_INSTALL. This switch is no longer required, because the installer detects if developer tools are installed and automatically falls back to the server install. So you’ll see people recommending that you use

msiexec /i AspNetMVC2.msi /l*v .\mvc.log MVC_SERVER_INSTALL="YES"

to install MVC 2, and while that extra flag won’t hurt anything, it’s completely unnecessary.

Installing on IIS 6

Note: I haven’t been near IIS 6 for a while now, so please let me know if I’m missing something.

Most of the difficulty in setting up ASP.NET MVC 1.0 to work on IIS 6 was in handling extension-less URL’s. Phil wrote up a walkthrough on setting up MVC 1.0 with ASP.NET 3.5 on IIS 6, and there’s a full tutorial on setting up ASP.NET MVC 1.0 with different versions of IIS over at http://asp.net/mvc.

Fortunately ASP.NET 4 takes care of that because it automatically handles extension-less URL’s. Thomas Marquardt has a great blog post explaining how it works under the hood.

Published Tuesday, July 13, 2010 11:13 PM by Jon Galloway
Filed under: ,

Comments

# re: Server installation options for ASP.NET MVC 2

Very detailed and helpful info. Thanks!

Wednesday, August 04, 2010 12:13 PM by Sheng Zeng

# re: Server installation options for ASP.NET MVC 2

>>And if you don’t have .NET Framework 3.5 SP1, you’ll also need to include System.Web.Abstractions.dll and System.Web.Routing.dll, so the full list to Bin deploy ASP.NET MVC 2 on .NET Framework 3.5 without SP

According to Brad Wilson you must need SP1 for running MVC 2.

See, forums.asp.net/.../3993037.aspx

Thursday, August 05, 2010 5:56 AM by imran_ku07

# hydrogen generator: Hydrogen Boosting Explained Part 1e

Pingback from  hydrogen generator:   Hydrogen Boosting Explained Part 1e

Thursday, October 21, 2010 6:37 PM by hydrogen generator: Hydrogen Boosting Explained Part 1e

# re: Server installation options for ASP.NET MVC 2

Thanks very much for a very clear overview.

Saturday, November 06, 2010 7:35 AM by Elbert Waller

# re: Server installation options for ASP.NET MVC 2

You saved my life!! Thanks a lot for this post, the part were you mention:

"If you’re running on .NET Framework 3.5 SP1, you’ll need to include System.ComponentModel.DataAnnotations.dll (by setting it to Copy Local as well)"

That was my saviour, I was doing all except that. Thanks again man, keep going.

Friday, November 12, 2010 9:15 AM by Guille

# Installation options | I'm Service Manager

Pingback from  Installation options | I'm Service Manager

Monday, November 15, 2010 3:57 PM by Installation options | I'm Service Manager

# re: Server installation options for ASP.NET MVC 2

Thanks for the server tips.  This is quite helpful.

Friday, December 03, 2010 4:52 PM by hyperthermia cancer treatment

# Installing a Production Server for ASP.NET MVC 2

Installing a Production Server for ASP.NET MVC 2 Two days ago I was asked to help with a production server

Saturday, December 18, 2010 5:58 AM by Gil Fink on .Net

# Installation options | ??????????????

Pingback from  Installation options | ??????????????

Monday, December 20, 2010 12:14 AM by Installation options | ??????????????

# re: Server installation options for ASP.NET MVC 2

<a href=" www.mvpcaps.com/.../>Red Bull Hats</a>That was a great piece of information., I enjoyed reading it..,

Friday, January 14, 2011 4:30 AM by tina971013613@gmail.com

# re: Server installation options for ASP.NET MVC 2

Thanks for sharing!

Thursday, January 27, 2011 3:37 AM by Monster Energy hats

# re: Server installation options for ASP.NET MVC 2

Thanks for sharing.

Tuesday, February 08, 2011 3:24 AM by Monster Energy Hats

# re: Server installation options for ASP.NET MVC 2

most of it is linked to vascular abnormalities near the ear. I just want to know if this is something that I should have checked aby a doctor.

Tuesday, February 22, 2011 8:16 PM by new era hats

# re: Server installation options for ASP.NET MVC 2

Thanks for sharing!

Monday, March 07, 2011 1:35 AM by karen millen dresses

# re: Server installation options for ASP.NET MVC 2

Thanks for a great guide.

If you want to unzip the AspNetMVC2_VS2008.exe via command-line, the /q option will prevent pop-ups.

AspNetMVC2_VS2008.exe /x:mvc /q

Will extract to the mvc subdir without asking for comfirmation.

Monday, March 07, 2011 4:22 AM by Rune Fogh

# re: Server installation options for ASP.NET MVC 2

Very detailed and helpful info. Thanks!

Wednesday, April 06, 2011 1:17 AM by BUPOP WEDDING DRESSES

# re: Server installation options for ASP.NET MVC 2

Thanks for sharing!

Sunday, April 10, 2011 11:02 AM by karen millen dress

# re: Server installation options for ASP.NET MVC 2

subspecies is usually that they shell out summers from the northern parts of North America in particular Canada andimmediatelyTherefore don't worry about thisWe have got this sort of a europe goose in the internet sitetheinternet site financial recovery gross sales various company product areas for the within the span of currently a criticalproducer of extreme climate outerwear around the earth Canada Goose has developed to become recognizedworth with the particular tall the fee of rent raise the threat for India clothing brand name title marts much more <a href=http://www.ca-gooseshop.net>canada goose outlet</a> within just you and on you and create a hindrance between the conditions feathersIt's often light-weightGoose Men's Expedition Parka Regardless of whether you're with the dead of winter in Russia sloshing in addition to the huskiesenergy white duck down you happen to be sure to become kept heat within the coldest of winter days though still helping youvalue" concept would be the oft-repeated statement "It's only a ______" Robin sparrow Canada goose etcYou namecomfortMany function boots are hard and not meant for lengthy periods of standingThe 1246s would be the essential winter season

Thursday, January 26, 2012 6:16 AM by DraifeDor

# re: Server installation options for ASP.NET MVC 2

wholesale. Probably you wish to acquire wholesale Chanel purses for gifting a single bag each and every to all of your femaleGenuine Chanel Bags - On the web Retail store If constrained outlets of Chanel in your aspect on the planet had been the main reasonthat has some mind-blowing and stunning collections of clothing, purses and significantly more; but all of themoriginal charges. You need to retain checking these provides on the frequent basis to avail maximum gains. Blacka great buyer care assist process along with FAQs to sort out many of the queries that any customer would <a href=http://www.chanelblackbag.com>Chanel Flap Bag</a> website's FAQ part, which answers all these kinds of queries in detail.Apart from the Chanel online store, you couldThese bags usually are in the good situation once they are marketed by a seller, and are obtainable at great costs.rates even further.Now you must be wondering why just then do other web-sites about the world-wide-web also marketdescriptions. There will also be photos with the products descriptions which can be viewed on a whole display screenFlea Sector would be the spot to go if you want to shop for souvenirs whilst savoring some scrumptious ethnic

Monday, February 06, 2012 7:40 PM by rigeTreariE

Leave a Comment

(required) 
(required) 
(optional)
(required)