[英]Could not load file or assembly 'System.Web.Mvc(1)' or one of its dependencies
The following error appeared after deploying the application to IIS, although it's NOT the first time to deploy this web application, but this is a new update to it! 将应用程序部署到IIS之后,出现以下错误,尽管这不是第一次部署此Web应用程序,但这是对其的新更新!
Could not load file or assembly 'System.Web.Mvc(1)' or one of its dependencies.
无法加载文件或程序集'System.Web.Mvc(1)'或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference.
找到的程序集的清单定义与程序集引用不匹配。 (Exception from HRESULT: 0x80131040)
(来自HRESULT的异常:0x80131040)
It looks like you tried to install the ASP.NET MVC dependency twice since you have System.Web.Mvc(1)
instead of plain System.Web.Mvc
, so please take note of that. 似乎您尝试两次安装ASP.NET MVC依赖项,因为您拥有
System.Web.Mvc(1)
而不是普通的System.Web.Mvc
,因此请注意这一点。 More than likely, that other assembly you are using is referencing the old dll, so make sure you have the right newVersion
value under BindingRedirect
in your Web.config
file, as it should look something like this: 更可能的是,其他装配您正在使用引用旧的DLL,所以一定要确保你有合适的
newVersion
下值BindingRedirect
在你Web.config
文件,因为它应该是这个样子:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.