Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install ASP.NET MVC 5 on a server?

I just updated my website from MVC 4 to MVC 5.

Now when I want to run it on my web server instead of my development machine it does not work.

It think it is because I need to install the MVC 5 libraries on the server but I can't find them.

I downloaded WebMatrix 3 hoping it would provide a way to install it but it only gives me the ability to install MVC 4.

What should I install to be able to run a ASP.NET MVC 5 application?

(without installing Visual Studio 2013)

EDIT: I disabled custom errors and eror what I have:

Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

EDIT 2: I found out that the problem was due to one of my dependencies which was using the version 2.0.0.0 of razor.

like image 997
alexandrekow Avatar asked Nov 13 '13 20:11

alexandrekow


1 Answers

When you deploy your app just make sure that all the assemblies are being deployed to your production environment in the bin folder. ASP.NET MVC is an xCopy deployment, so you don't have to install anything.

You might want to check that your Production environment has ASP.NET 4.0 and 4.5 registered.

like image 78
Khalid Abuhakmeh Avatar answered Oct 17 '22 00:10

Khalid Abuhakmeh