views:

312

answers:

2

I have a new WIndows Server 2008 R2 x64 DataCentre with Framework 3.5 SP1 and Framework 4 installed. When I install my MVC application (VS 2008 MVC 2.0 using a Web Setup project installer) and browse to the application I get an error that System.Web.Mvc cannot be found. If I copy the relevant DLLs (System.Web.Mvc etc)into the bin directory the app runs up perfectly.

I have checked everywhere for an installer but can only find the VS2008 related bits, no server runtime. How do I get ASP.Net MVC installed in this environment so that we don't have to Copy Local the dlls?

Many thanks Brian

+3  A: 

You could do a server install which doesn't require Visual Studio installed:

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

Now you are probably asking where's this AspNetMVC2.msi coming from. Actually you download AspNetMVC2_VS2008.exe from here, rename the .exe to .zip and inside you'll find what you are looking for (in the mvcruntime sub-folder).

Darin Dimitrov
Hmm, I tried that but when I attempt to open the resulting .zip file it is invalid. I tyried opening it from Windows Explorer and 7zip. Has this worked for you?
Redeemed1
Aha! It can be opened with WinRAR
Redeemed1
+2  A: 

You can use the Web Platform Installer to install ASP.NET MVC2 and register it in IIS.. It's probably one of the most simple ways to install extensions for your server. Just follow this link: http://go.microsoft.com/fwlink/?LinkID=185037

Just to be more detailed here.. If you have Platform Installer installed - when you click on the second link (and have platform installer closed), a window will pop up, with details about MVC2. It will have an Install button. Just click it, accept the terms and you're done :) Here's what this window looks like: http://lh5.ggpht.com/_uVsNX7rt1gI/S81ffYtSDBI/AAAAAAAAAIM/3raMs0bomNo/MVC2.PNG

Artiom Chilaru
I had done this as this is where you get led when you look for the server runtime components. However, it did NOT install MVC 2 and I worked through all of the options in some detail
Redeemed1
I've got a live server running Server 2008 R2 x64.. I have just followed the same link, installed MVC2, then went to the website bin directory and deleted System.Web.Mvc.dll there.. (I didn't bother doing it before :) )Refreshed the page: the website app pool reloaded, and the page loads fine.. Could you try it again? It most definitely works!
Artiom Chilaru
Actually, just going through this process and am confident that it will work. I presume you are refering to the MVC 2 link in the other answer? Thanks for the confirmation
Redeemed1
Nope.. I was following the link from my answer :)I'm sure the other approach by @Darin works as well, and the end result is most likely the same, but I find it easier to use the Platform Installer :)
Artiom Chilaru
Updated the post with a screen shot, just so you know what I mean ^_^
Artiom Chilaru