2012-11-15 2 views
6

http 응용 프로그램을 https 및 ssl로 자체 서명 된 인증서로 변환하는 과정에있었습니다.오류 : http에서 메타 데이터를 가져올 수 없습니다 ...... wsdl

나는 localhost : ##### 브라우저를 방문하여 서비스를 시작해야합니다. 서비스가 시작되면

, 난 비주얼 스튜디오 2012 령 어 프롬프트에서 다음 호출 테스트 :

svcutil.exe https://localhost:10201/?wsdl 

하고

Error: Cannot obtain Metadata from https://localhost:10201/?wsdl 

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


WS-Metadata Exchange Error 
    URI: https://localhost:10201/?wsdl 

    Metadata contains a reference that cannot be resolved: 'https://localhost:10201/?wsdl'. 

    Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost:10201'. 

    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://localhost:10201/?wsdl 

    There was an error downloading 'https://localhost:10201/?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 /?" 

으로 돌아 오는 나의 성공이 detremental인가 HTTPS가 있습니까?

내 설정

같은 같습니다

어떻게 내가 그것을 제거 할 수

<system.serviceModel> 

    <!--SERVICES--> 
    <services> 
     <service name="DuplexService.DuplexService" 
     behaviorConfiguration="sb"> 

     <endpoint 
      address="basic" 
      binding="customBinding" 
      bindingConfiguration="customDuplexBinding" 
      contract="DuplexService.Interface.IDuplexServiceContract"> 
     </endpoint> 

     <endpoint 
      address="" 
      binding="webHttpBinding" 
      behaviorConfiguration="webHttpEndpointBehavior" 
      bindingConfiguration="webHttpsBinding" 
      contract="Interface.IPolicyRetriever"> 
     </endpoint> 

     <endpoint 
      address="mex" 
      binding="mexHttpsBinding" 
      contract="IMetadataExchange"> 
     </endpoint> 

     <host> 
     <baseAddresses> 
      <add baseAddress="https://localhost:10201" /> 
     </baseAddresses> 
     </host> 
     </service> 


    </services> 


    <!--BEHAVIOURS--> 
    <behaviors> 
    <!--Policy--> 
     <endpointBehaviors> 
     <!-- For Policy Service --> 
     <behavior name="webHttpEndpointBehavior"> 
      <webHttp /> 
     </behavior> 
     </endpointBehaviors> 


<!--behaviour for all of the enpoints --> 
     <serviceBehaviors> 
     <behavior name="sb"> 
      <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
      <serviceMetadata httpsGetEnabled="true" httpsGetUrl="https://localhost:10201"/> 
      <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
      <serviceDebug includeExceptionDetailInFaults="true"/> 
      <!-- This will solve a bug that happens if too many items are sent at once from the gateway to the client --> 
      <dataContractSerializer maxItemsInObjectGraph="2147483647"/> 
      <serviceThrottling 
      maxConcurrentCalls="200" 
      maxConcurrentSessions="200" 
      maxConcurrentInstances="200" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 



    <!-- BINDINGS--> 
    <bindings> 

    <webHttpBinding> 
     <binding name="webHttpsBinding"> 
      <security mode="Transport"> 
       <transport clientCredentialType="None" /> 
      </security> 
     </binding> 
    </webHttpBinding> 

     <customBinding> 
     <binding name="customDuplexBinding"> 
      <pollingDuplex duplexMode="MultipleMessagesPerPoll" 
       maxOutputDelay="00:00:01" 
     serverPollTimeout="00:01:00" 
     inactivityTimeout="02:00:00" 
     maxPendingMessagesPerSession="2147483647" 
     maxPendingSessions="2147483647" /> 
      <binaryMessageEncoding> 
      <readerQuotas 
       maxDepth="2147483647" 
       maxStringContentLength="2147483647" 
       maxArrayLength="2147483647" 
       maxBytesPerRead="2147483647" 
       maxNameTableCharCount="2147483647" /> 
      </binaryMessageEncoding> 
      <httpsTransport 
     maxBufferSize="2147483647" 
     maxReceivedMessageSize="2147483647" 
     transferMode="StreamedResponse" /> 
     </binding> 
     </customBinding> 



    </bindings> 




    <!-- Register the binding extension from the SDK. --> 
    <extensions> 
     <bindingElementExtensions> 
     <add name="pollingDuplex" 
      type="System.ServiceModel.Configuration.PollingDuplexElement, System.ServiceModel.PollingDuplex" /> 
     </bindingElementExtensions> 
    </extensions> 
    </system.serviceModel> 
? 메타 데이터가 작동하고 GET이 작동하도록 만드시겠습니까?

답변

10

나는 이것을 처리 할 수있는 4 가지 방법을 생각할 수 있습니다.

  1. 신뢰할 수있는 루트 인증으로 자체 서명 된 인증서를 설치하십시오. MMC -> 인증서
  2. 브라우저를 사용하여 wsdl (인증서 오류를 지나치게 클릭)으로 이동 한 후 저장하고 wsdl을 직접 생성하십시오.
    • 는 브라우저에서 WSDL의 URL을 넣고 컴퓨터에 WSDL을 저장 실제 WSDL
    • 를 볼 수 있도록 인증서 경고 과거를 클릭합니다. 크롬에서는 마우스 오른쪽 버튼을 클릭하고 다른 이름으로 저장하십시오. Visual Studio에서
      • 프로젝트를 마우스 오른쪽 버튼으로 클릭하고 실제 경로를 입력하고 주소 상자에
      • "서비스 참조 추가"를 선택 : 다운로드 WSDL의 (C \ 디렉토리를 ...).
      • 히트는 피들러를
  3. 화재를 이동하여 인증서를 설치하고 당신에게 원격 인증서 오류를 무시하는 옵션을 줄 것이다 HTTPS를 해독하도록 지시. 여기에 설명되어 있습니다. http://proq.blogspot.com/2012/02/svcutil-and-https.html
  4. 신뢰할 수있는 루트가 서명 한 인증서를 사용하십시오.

cert 오류를 무시하는 svcutil 옵션이 없습니다.

+0

도움이되지 않았지만 향후 답변을 찾는 다른 pepole에게 도움이 될 것입니다. –

+1

옵션 3이 치료를 받았습니다! 옵션 3에 대한 –

+0

동등! – rhoeting

0

나는 동일한 문제가있었습니다. 내게는 https가 유효 기간이 유효하지 않은 다른 인증서를 사용하고있는 것으로 나타났습니다. 왜 그런 일이 일어 났는지 확신 할 수 없습니다. Https 포트 번호와 새로운 자체 서명 된 인증서를 변경했습니다. WCFtestClinet은 HTTPS를 통해 서버에 연결할 수 있습니다!

관련 문제