我昨天运行了Windows Update,并在我尝试释放ASP.NET MVC 4项目的新版本时引入了一些问题。窗口更新Brooke MVC应用程序
应用程序编译,当我推的版本为什么要在我的网络服务器测试站点它倒下,出现错误消息没关系但是本地运行,:
System.Web.HttpCompileException: (0): error CS1705: Assembly 'App_Code, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
经过一番研究,我发现,这是由于从4.0.0.0到4.0.0.1的更新。我从我的项目中删除了System.Web.Mvc dll,并且阅读了具有更高版本的dll。再次,一切工作在本地,但不在网上。然后我浏览了web.config,并将4.0.0.0中的任何内容更改为4.0.0.1。同样,这继续在内部工作,但在外部失败。该错误信息是:
Could not load file or assembly 'System.Web.Mvc, Version=3.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) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=3.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) Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Mvc, Version=3.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].
我相信这事做与我使用了错误处理ELMAH。
我试图从Nuget重新安装,如下面的建议:Windows update caused MVC3 and MVC4 stop working但这并没有奏效,我得到了同样的错误。
添加信息: 服务器尚未更新,我担心更新此可能会破坏现有的实时版本。
[ASP.NET MVC安全修补程序版本3.0.0.1打破构建]的可能重复(http://stackoverflow.com/questions/26406877/asp-net-mvc-security-patch-to-version-3- 0-0-1-break-build) – 2014-10-17 13:08:02