2011-08-10 2 views
1

우리는 우리는 HTTP 및 HTTPS 사용하도록 설정 웹 사이트를WCF RIA 서비스 도메인 서비스는

[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> 

모든 것이 괜찮 : 우리는이 같은 웹 사이트의 루트에 클라이언트 액세스 정책 파일이 있습니다.

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.

우리의 정책 파일이 잘못이지만, 무엇을 볼 수 있음을 의미한다 : 우리는 HTTP를 통해 액세스 할 때 우리는 다음과 같은 오류가 발생합니다. 어떤 아이디어?

답변

1

작동하지 않는 이유는 자체 서명 된 인증서를 사용하여 컴퓨터 이름을 생성 한 다음 URL에 localhost를 사용했기 때문입니다. ssl에 인증서 오류가 없도록 URL을 일치시켜야합니다.

이 방법을 확인하는 좋은 방법은 https를 통해 전체 사이트를 실행하고 브라우저에서 인증서 오류가 발생하지 않는지 확인하는 것입니다.