2011-08-10 9 views
1

我々はHTTPとHTTPSを使用するように設定するウェブサイトを持っているWCF RIA ServicesドメインサービスHTTPSを介してクライアントアクセスポリシーの問題

[EnableClientAccess(RequiresSecureEndpoint = true)] 

とWCF RIAドメインサービスを提供しています。我々はHTTPS経由でSilverlightアプリケーションにアクセスすると

<access-policy> 
<cross-domain-access> 
<policy> 
    <allow-from http-request-headers="*"> 
    <domain uri="http://*"/> 
    <domain uri="https://*"/> 
    </allow-from> 
    <grant-to> 
    <resource include-subpaths="true" path="/"/> 
    </grant-to> 
</policy> 
</cross-domain-access> 
</access-policy> 

すべてがうまくている:私たちは、このようなウェブサイトのルートにあるクライアントアクセスポリシーファイルを持っています。 httpを介してアクセスすると、次のエラーが表示されます。

Invoke operation 'Working' failed. An error occurred while trying to make a request to URI 'https://localhost/ClientBin/SilverlightApplication3-Web-DomainService1.svc/binary/Working'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

これは、ポリシーファイルが間違っていても何も表示されないことを示しています。何か案は?

答えて

1

それが機能しない理由は、自己署名証明書を使用していて、マシン名を生成してからurlでlocalhostを使用したためでした。 urlは、sslが証明書エラーを取得しないようにする必要があります。

これを確認するには、サイト全体をhttpsで実行し、ブラウザが証明書エラーを表示しないようにすることが有効です。

関連する問題