2011-02-08 33 views
1

https를 통해 내 WCF 서비스를 거의 모두 사용하도록 설정했습니다. IIS 응용 프로그램이 실행 중이며 localhost에서 svc 및 wsdl을 읽을 수 있습니다. 그래서 Visual Studio로 돌아가 서비스를 호출 할 수있는 클라이언트를 작성하려고했습니다. ServiceReference를 추가 할 때 다음 오류가 발생합니다.IIS에서 호스팅되는 WCF의 구성표 HTTPS 오류와 일치하는 기본 주소를 찾을 수 없습니다.

MetadataExchangeHttpsBinding 바인딩을 사용하여 끝점에 대한 구성표 https와 일치하는 기본 주소를 찾을 수 없습니다. 등록 된 기본 주소 체계는 [http]입니다.

내장 개발 서버와 IIS Express를 사용해 보았습니다. 그들은 둘 다 같은 오류를 주었다.

<configuration> 
    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
    <bindings> 
     <wsHttpBinding> 
     <binding name="TransportSecurity"> 
      <security mode="Transport"> 
      <transport clientCredentialType="None" /> 
      </security> 
     </binding> 
     </wsHttpBinding> 
    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="SmartCook2.Server.ISmartCookServiceBehavior"> 
      <serviceMetadata httpsGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="false"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    <services> 
     <service behaviorConfiguration="SmartCook2.Server.ISmartCookServiceBehavior" 
     name="SmartCook2.Server.SmartCookService"> 
     <endpoint address="https://localhost:6344/SmartCookService.svc" 
      binding="wsHttpBinding" bindingConfiguration="TransportSecurity" 
      contract="SmartCook2.Server.ISmartCookService" /> 
     <endpoint address="mex" binding="mexHttpsBinding" 
      contract="IMetadataExchange" /> 
     </service> 
    </services> 
    </system.serviceModel> 
<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 
</configuration> 

내가 잘못 뭐하는 거지 :

여기 내 Web.config의입니까?

+0

어떤 ** 주소 (URL) ** 참고 Visual Studio에서 서비스 참조를 만들려고 사용 않았다? 서비스의 기본 주소 또는 MEX 주소 –

+0

서비스 참조를 추가 할 때 VS에서 Discover 단추를 사용하고 서비스가 http : // localhost : 6344/SmartCookService.svc로 발견되었습니다. '. 나는 또한 주소를 https로 변경하려고 시도했다. 그것도 작동하지 않았다. – Tenshiko

답변

0

응용 프로그램 부분을 생략 했으므로 VS가 주소를 제대로 찾지 못했습니다. 그래서 서비스 참조에 대한 올바른 주소 :

https://localhost/IISHostedSmartCook/SmartCookService.svc