如何在服务器上安装ASP.NET MVC 5? [英] How to install ASP.NET MVC 5 on a server?

查看:586
本文介绍了如何在服务器上安装ASP.NET MVC 5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚更新了我的网站从MVC 4至5 MVC

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

现在,当我想我的Web服务器上运行,而不是我的开发机器不工作。

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

据认为这是因为我需要在服务器上安装了MVC 5库,但我无法找到他们。

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

我下载 WebMatrix的3 希望它会提供一种方法来安装它,但它只是给我的安装MVC 4的能力。

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

我应该怎么安装到能够运行一个ASP.NET MVC 5应用程序?

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

(没有安装Visual Studio 2013)

(without installing Visual Studio 2013)

编辑:
我禁用自定义错误和eror我有什么:

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)

编辑2:
我发现这个问题是由于其使用剃刀的版本2.0.0.0我的一个依赖。

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.

推荐答案

在部署应用程序只需要确保所有的组件都被部署到生产环境在文件夹中。 ASP.NET MVC是一个Xcopy部署,所以你不必安装任何东西。

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.

您可能要检查您的生产环境有ASP.NET 4.0和4.5注册。

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

这篇关于如何在服务器上安装ASP.NET MVC 5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆