[英]ASP.NET - Couldn't publish my web site in windows server 2008 r2
First of all I publish my website in windows 7 and everything goes alright. 首先,我在Windows 7中发布我的网站,一切正常。 But when I'm trying to publish the same website in windows server 2008 r2 I got this error:
但是,当我尝试在Windows Server 2008 R2中发布同一网站时,出现此错误:
Server Error in '/MyWebsite' Application.
“ / MyWebsite”应用程序中的服务器错误。 Could not load file or assembly 'System.Net.Http' or one of its dependencies.
无法加载文件或程序集“ System.Net.Http”或其依赖项之一。 Strong name signature could not be verified.
无法验证强名签名。 The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key.
程序集可能已被篡改,或者已被延迟签名,但未使用正确的私钥完全签名。 (Exception from HRESULT: 0x80131045)
(来自HRESULT的异常:0x80131045)
Can any body help me, please!! 有人可以帮我吗! I looked for this error for days now and I got nothing to do.
我几天以来一直在寻找此错误,但我无事可做。 Thanks in advance!
提前致谢!
It seems you not copied your dll to your another website in window server 2008 r2 看来您没有将dll复制到Windows Server 2008 R2中的另一个网站
if you already copied .dll
to your 2008 iis then .. 如果您已经将
.dll
复制到了2008 iis,则..
First check 第一次检查
Both are system are running in same 64bit or 32bit ? 两者都是以相同的64位或32位运行?
If not then 如果没有
1.Open IIS Manager 1.打开IIS管理器
2.Select Application Pools 2.选择应用程序池
3.then select the pool you are using 3.然后选择您正在使用的游泳池
4.go to advanced settings (at right side) 4.转到高级设置(在右侧)
Another solution 另一种解决方案
1- check if you are referencing an assembly which in turn referencing an old version of unity. 1-检查您是否引用了程序集,而程序集又引用了旧版本的unity。 for example let's say you have an assembly called ServiceLocator.dll which needs an old version of Unity assembly, now when you reference the ServiceLocator you should provide it with the old version of Unity, and that makes the problem.
例如,假设您有一个名为ServiceLocator.dll的程序集,该程序集需要一个旧版本的Unity程序集,现在,当您引用ServiceLocator时,应该为它提供旧版本的Unity,这便引起了问题。
2- may be the output folder where all projects build their assemblies, has an old version of unity. 2-可能是所有项目都在其中生成其程序集的输出文件夹,具有旧版本的unity。
you can use FuseLogVw application to find out who is loading the old assemblies, just define a path for the log, and run your solution, then check (in FuseLogvw) the first line where the Unity assembly is loaded, double click it and see the calling assembly, and here you go. 您可以使用FuseLogVw应用程序来找出谁正在加载旧程序集,只需定义日志路径,然后运行解决方案,然后检查(在FuseLogvw中)加载Unity程序集的第一行,双击它并查看调用程序集,然后开始。
There are many other possibilities.. 还有许多其他可能性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.