将应用程序部署到IIS之后出现以下错误,尽管这不是第一次部署此Web应用程序,但这是对其的新更新!
无法加载文件或程序集'System.Web.Mvc(1)'或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040)
答案 0 :(得分:1)
由于您拥有System.Web.Mvc(1)
而不是普通的System.Web.Mvc
,因此您似乎试图两次安装ASP.NET MVC依赖项,因此请注意。您正在使用的其他程序集很有可能正在引用旧的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>