Asp.net mvc 3 配置错误:System.Web.Helpers

Asp.net mvc 3 配置错误:System.Web.Helpers,asp.net-mvc-3,.net-4.0,web-config,iis-6,Asp.net Mvc 3,.net 4.0,Web Config,Iis 6,我在服务器上部署了一个站点,我得到了这个错误。为什么我会得到这个 Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file app

我在服务器上部署了一个站点,我得到了这个错误。为什么我会得到这个

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Could not load file or assembly 'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error: 


Line 16:       <assemblies>
Line 17:         <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 18:         <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 19:         <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 20:         <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

Source File: C:\<path>\web.config Line: 18 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
配置错误
描述:处理服务此请求所需的配置文件时出错。请查看下面的特定错误详细信息,并适当修改配置文件。
分析器错误消息:无法加载文件或程序集“System.Web.Helpers,Version=1.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或其依赖项之一。系统找不到指定的文件。
源错误:
第16行:
第17行:
第18行:
第19行:
第20行:
源文件:C:\\web.config行:18
程序集加载跟踪:以下信息有助于确定无法加载程序集“System.Web.Helpers,Version=1.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”的原因。
警告:程序集绑定日志记录已关闭。
要启用程序集绑定失败日志记录,请将注册表值[HKLM\Software\Microsoft\Fusion!EnableLog](DWORD)设置为1。
注意:程序集绑定失败日志记录会带来一些性能损失。
要关闭此功能,请删除注册表值[HKLM\Software\Microsoft\Fusion!EnableLog]。

看起来您部署应用程序的服务器上没有安装ASP.NET MVC 3。如果你不想在服务器上安装ASP.NET MVC 3,你也可以安装你的应用程序。

我遇到了同样的问题,我从Microsoft站点安装了ASP.NET MVC 3工具更新,它解决了问题


在安装之前,还要检查是否存在C:\Program Files(x86)\Microsoft ASP.NET。在我的情况下,此文件夹丢失,安装后我已注册此文件夹和程序集

我的情况如下。一款全新的笔记本电脑,Visual Studio 2015正在处理一个稍旧的MVC3项目。Visual Studio 2015及更高版本显然不再安装MVC 3。因此,在下载并安装了AspNetMVC3ToolsUpdateSetup.exe之后,正确的参考文件(来自GAC)。生成完成时没有错误,除此安装之外,无需额外步骤。

根据Visual Studio最新版本中的注释,在项目上没有右键单击
添加可部署依赖项
选项,因此您可以执行以下操作:

使用Package Manager控制台并运行以下命令:

安装软件包Microsoft.AspNet.Mvc-版本3.0.20105.1

应该以使其 箱子可展开

然后我得到了这个错误:

无法加载文件或程序集'NuGet.Core,版本=1.0.11220.104, 区域性=中性,PublicKeyToken=31bf3856ad364e35'或其 依赖关系

我删除了文件:
bin\System.Web.WebPages.Administration.dll