2009-04-27 20 views
0

Assembly.LoadFromでHTTPSパスを使用できません。Assembly.LoadFromを使用してHTTPSサイトからダウンロードできません

TrustAllCertificatePolicyを使って試してみましたが、うまく動作しませんでした。

私はクライアントマシンからcaspolを使用してサーバーにfulltrustを与えました。同じ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]. 
+0

HKLM \ Software \ Microsoft \ Fusion!EnableLogを設定して、より良い例外ログを取得できますか? –

答えて

0

コードアクセスセキュリティは、通常の(完全な権利へのアクセス)にHTTPとHTTPSの場所からのコードの実行をブロックします。

AppDomainでCAS設定をインターネット許可セットで実行するには、新しいAppDomain(および可能であればリモートドメイン/シリアル化可能なタイプを作成する必要があります)を作成する必要があります。これにより、ダウンロードしたコードがローカルマシンを変更することがなくなります。

リモートコード(およびそれを変更できるユーザー)を本当に信頼している場合は、より多くのアクセスを許可するカスタムアクセス許可セットを作成できます。

関連する問題