[英]Azure webrole cycling and “Could not load file or assembly System.Web.Http 5.2.0.0”
I can't deploy my azure webrole anymore, it's cycling indefinitly. 我再也无法部署我的天蓝色webrole,它无限循环。 So I put on Intellitrace and I found this exception : 所以我穿上了Intellitrace,我发现了这个异常:
Exception:Thrown: "Unable to load the role entry point due to the following exceptions: -- System.IO.FileLoadException: Could not load file or assembly 'System.Web.Http, Version=5.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) 异常:抛出:“由于以下异常,无法加载角色入口点: - System.IO.FileLoadException:无法加载文件或程序集'System.Web.Http,Version = 5.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。(HRESULT的异常:0x80131040)
In my project, web.config and package (Webapi, webhost etc.) are all in 5.2.0.0 so I don't understand why Azure try to find 5.0.0.0 ?! 在我的项目中,web.config和包(Webapi,webhost等)都在5.2.0.0中,所以我不明白为什么Azure试图找到5.0.0.0?
Example: 例:
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
</dependentAssembly>
Do you have any idea ? 你有什么主意吗 ? Thanks 谢谢
ps: System.Web.Http
got copy local:true ps: System.Web.Http
得到了本地复制:true
That intellitrace output is telling you that WaIISHost.exe is crashing ("Unable to load the role entry point"). intellitrace输出告诉你WaIISHost.exe崩溃(“无法加载角色入口点”)。 But your web.config assembly binding redirect is only affecting the w3wp.exe process. 但是您的web.config程序集绑定重定向仅影响w3wp.exe进程。 You have a couple options: 你有几个选择:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.