问题
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?
回答1:
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
回答2:
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.
来源:https://stackoverflow.com/questions/5218572/strange-problems-about-strong-name-verification-skipping