【发布时间】:2009-04-27 14:54:19
【问题描述】:
无法在 Assembly.LoadFrom 中使用 HTTPS 路径。
也尝试使用TrustAllCertificatePolicy 类,但没有成功。
我已经从客户端机器上完全信任使用 caspol 的服务器。相同的 URL 可在禁用 ssl 的情况下使用。它不适用于启用 ssl。请帮忙。
例外是:
System.IO.FileLoadException: Security problem encountered when connecting to URL for 'https://ip/tasks/tasks.dll'. File name: 'https://ip/tasks/tasks.dll'
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity,
Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity,
StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence,
Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated
with assembly bind failure logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
【问题讨论】:
-
能否设置 HKLM\Software\Microsoft\Fusion!EnableLog 以获得更好的异常日志?
标签: c# assemblies