项目本地工作,但崩溃在Azure上 [英] Project works locally but crashes on Azure
问题描述
我刚刚出版了我的项目Azure和所有的突然我得到以下错误:
无法加载文件或程序集System.Web.Cors,版本5.0.0.0 =文化=中性公钥= 31bf3856ad364e35或它的一个依赖。找到的程序集清单定义不匹配程序集引用。 (异常来自HRESULT:0x80131040)
块引用>我还没有更新/安装任何的NuGet包自上次发布。
此外,我刚检查了.dkk文件,复制本地设置为true。这可能是什么问题吗?我并没有改变任何东西。
在一个sitenode我的项目在当地工作的罚款。
解决方案这是必然到来的DLL版本的原因不同,或者缺少DLL上的环境。
您需要检查以下几个步骤:
一个Cors DLL应该存在在你的BIN目录[Azure上]
如果它的存在,然后部署在服务器DLL版本和当地都应该是一样的。 [您可以在属性检查】
- 如果您的Azure服务器走高一个Cors DLL版本,比较当地的之一,那么你可以
< dependentAssembly>
< assemblyIdentity名称=System.Web.Cors公钥=31bf3856ad364e35/>
< bindingRedirect oldVersion =1.0.0.0-5.0.0.0NEWVERSION =5.0.0.1/>
< / dependentAssembly>
块引用>您新版本可能是你的DLL版本这是availbale到BIN目录。
I just published my project to Azure and all the sudden I get the following error:
Could not load file or assembly 'System.Web.Cors, 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)
I have not updated/installed any nuget packages since the last publish. Furthermore I just checked the .dkk file and copy local is set to true.
What could be the issue here? I haven't changed anything.
On a sitenode my project works fine locally.
解决方案This is surely coming cause of your DLL version is different OR DLL is missing on that environment.
Few steps you require to check:
Cors DLL should be there in your BIN directory [On Azure]
If it's there then Version of DLL deployed on server and your local both should be same. [You can check in properties]
- If your version of Cors DLL higher on Azure server, compare to local one then you can
<dependentAssembly> <assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.1" /> </dependentAssembly>
Your new version could be your DLL version which are availbale into the BIN directory.
这篇关于项目本地工作,但崩溃在Azure上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!