关于跳过强名称验证的奇怪问题
我的 ASP.NET 应用程序使用没有强名称的程序集。当我在 IE 中运行它时,它显示一个错误:
无法通过“xxxxx”加载文件或程序集。或其依赖项之一。无法验证强名称签名者。该程序集可能已被篡改,或者已延迟签名但未使用正确的私钥完全签名。 (HRESULT 异常:0x80131045)”
我使用 sn.exe -Vr xxxx
注册该程序集以跳过强名称验证,但它仍然显示该错误。可能导致此问题的原因是什么?接下来我可以做些什么来修复它吗?
My ASP.NET application is using an assembly without strong name. When I run it in IE, it shows an error saying:
Could not load file or assemlby 'xxxxx.' or one of its dependencies. Strong name signatuer 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)"
I use sn.exe -Vr xxxx
to register that assembly to skip the strong name verification, but still it shows that error. What could be causing this problem, and what can I do next to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是因为您正在使用 32 位 sn.exe 取消 64 位计算机中程序集的签名,反之亦然。使用正确的 sn.exe 可以解决此问题。请参阅超级链接解决方案
This is because you are using 32 bit sn.exe to unsign an assembly in your 64 bit machine or vice versa. Use proper sn.exe you to solve this issue. Please see the hyperlink for the solution
这是延迟签名,用于测试:您需要运行
sn -Vr
在您想要跳过验证的每台计算机上。我想在将程序集发布到网络之前,您必须完成签名
sn -r
。That's delay signing, intended for testing: you need to run
sn -Vr
on every machine that you want to skip verification on.I guess you'll have to complete the signing,
sn -r
, before you publish your assembly to the web.