2010-12-04 2 views
3

webservice에 액세스하는 작은 응용 프로그램을 작성하려고하지만 webservice에 잘못된 SSL 인증서가 있습니다. 나는 그것이 제 3 자의 통치하에 있기 때문에이 사실을 통제 할 수 없습니다.잘못된 SSL 인증서를 사용하여 WSDL에서 서비스 프록시를 생성하는 중 문제가 발생했습니다.

IE를 통해 사이트에 액세스를 시도했는데 (관리자 및 내 사용자로서) 인증서를 설치했지만 다음 번에 찾아 볼 때와 같은 오류가 발생하므로 대단히 보이지 않습니다. .

C:\Personal>svcutil.exe https://b2b:9443/LiveFeed.svc?wsdl 
Microsoft (R) Service Model Metadata Tool 
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] 
Copyright (c) Microsoft Corporation. All rights reserved. 

Attempting to download metadata from 'https://b2b:9443/LiveFeed.svc?wsdl' using 
WS-Metadata Exchange or DISCO. 
Microsoft (R) Service Model Metadata Tool 
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] 
Copyright (c) Microsoft Corporation. All rights reserved. 

Error: Cannot obtain Metadata from https://b2b:9443/LiveFeed.svc?wsdl 

If this is a Windows (R) Communication Foundation service to which you have acce 
ss, please check that you have enabled metadata publishing at the specified addr 
ess. For help enabling metadata publishing, please refer to the MSDN documentat 
ion at http://go.microsoft.com/fwlink/?LinkId=65455. 


WS-Metadata Exchange Error 
    URI: https://b2b:9443/LiveFeed.svc?wsdl 

    Metadata contains a reference that cannot be resolved: 'https://b2b:9443/Liv 
eFeed.svc?wsdl'. 

    Could not establish trust relationship for the SSL/TLS secure channel with a 
uthority 'b2b:9443'. 

    The underlying connection was closed: Could not establish trust relationship 
for the SSL/TLS secure channel. 

    The remote certificate is invalid according to the validation procedure. 


HTTP GET Error 
    URI: https://b2b:9443/LiveFeed.svc?wsdl 

    There was an error downloading 'https://b2b:9443/LiveFeed.svc?wsdl'. 

    The underlying connection was closed: Could not establish trust relationship 
for the SSL/TLS secure channel. 

    The remote certificate is invalid according to the validation procedure. 

If you would like more help, type "svcutil /?" 

나는 문제가 인증서가 유효하지 않은 것을 함께 할 수 알지만, 내가 인증서를 신뢰할 할 수없는 것 :

나는 다음과 같은 출력을 얻을 수는 svcutil 내가 실행

. 이 일을 어떻게 하죠?

내가 지금까지해온 내용은 ​​오류를 클릭하고 인증서를보고 설치하는 것입니다. 인증서 저장소에서 Windows가 자체 및 개인 저장소와 신뢰할 수있는 저장소에서이 저장소를 선택했는데 아무런 차이가 없습니다.

내가이 문제를 해결할 수 있다고하더라도 나는 우리가 두 나라에 있다는 점을 감안할 때 내 고객 PC에 응용 프로그램을 설치할 때 문제가 발생할 것이라고 우려하고 있습니다.

도움을 주시면 감사하겠습니다.

+0

혹시이 해결나요? 나는 같은 문제에 직면 해있다. – Kyle

답변

1

인증서의 루트 CA 인증서를 설치하는 것처럼 간단 할 수도 있습니다. 이 질문에 당신을 도울 수에 대한

+0

인증서 설치를 여러 번 시도했지만 작동하지 않았습니다. 루트 CA Cert는 자체 인증서와 다른가요? 그렇다면 어떻게 설치하겠습니까? –

+0

예, CA는 다른 인증서입니다. "인증 기관"인증서는 사용중인 인증서를 확인하는 인증서입니다. Verisign, Thawte 등의 CA 인증서는 PC에 사전 설치되어 있으므로 인증서가 유효한지 확인할 수 있습니다. CA 인증서의 공개 키 (.cer 또는 .p7b 파일)를 클릭하기 만하면 클릭하고 설치하는 것만 큼 간단해야합니다. 좀 더 자세한 방법을 보려면 여기를 클릭하십시오. http://blogs.technet.com/b/sbs/archive/2008/05/08/installing-a-self-signed-certificate-as-a-trusted- root-ca-in-windows-vista.aspx – Doobi

0
try this before calling the service.. 

    ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(
      delegate 
      { 
       return true; 
      }); 
관련 문제