2011-03-10 4 views
2

http 바인딩에서 잘 실행되는 WCF 서비스가 있습니다. SSL을 사용하도록 업데이트하려고했지만 다음과 같은 오류가 나타납니다.SSL을 요구하도록 WCF 서비스 변경

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

이것은 선택을 해제해도 IIS 7.5에서 "SSL 필요"로 설정 한 경우에만 발생합니다.

은 여기 내 설정

<system.serviceModel>  
<behaviors> 
    <serviceBehaviors> 
    <behavior name="ServiceBehavior" > 
     <dataContractSerializer maxItemsInObjectGraph="2147483646"/> 
     <!-- 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="false" /> 
     <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" /> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
<bindings> 
    <wsHttpBinding> 
    <binding name="wsHttpEndpointBinding"> 
    </binding> 
    </wsHttpBinding> 
</bindings> 
<services> 
    <service behaviorConfiguration="ServiceBehavior" name="WcfService1.Service1"> 
    <host> 
     <baseAddresses> 
     <add baseAddress="http://localhost/WcfService1/"/> 
     </baseAddresses> 
    </host> 
    <endpoint address="" binding="wsHttpBinding" bindingConfiguration="" 
     name="wsHttpEndpoint" contract="WcfService1.IService1" /> 
    <endpoint address="mex" binding="mexHttpsBinding" bindingConfiguration="" 
     name="MexHttpsBindingEndpoint" contract="IMetadataExchange" /> 
    </service> 
</services> 
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 

내가 해봤 allsorts- 라임, 아무것도가 저를 얻는 것, 어떤 도움을 크게 감사입니다!

<bindings> 
    <wsHttpBinding> 
    <binding name="wsHttpEndpointBinding"> 
     <security mode="Transport" /> 
    </binding> 
    </wsHttpBinding> 
</bindings> 

그리고 참조하는 구성의 이름으로 그 bindingConfiguration 속성을 설정하여 endpoint의 구성 :

답변

1

은 바인딩 구성을 수정합니다. IIS에서 호스팅 할 때 사용되지 않기 때문에

<endpoint address="" binding="wsHttpBinding" 
    bindingConfiguration="wsHttpEndpointBinding" 
    name="wsHttpEndpoint" contract="WcfService1.IService1" /> 

또한 기본 주소로 host 섹션을 삭제할 수 있습니다.

+0

내가 추천 한대로 따라 갔고 서비스가 현재 https에서 작동 중입니다! 당신의 도움을 주셔서 대단히 감사합니다! – WillMcKill

1

바인딩 구성 설정 변경 (Ladislav 언급) ... 기본 주소의 HTTP를 HTTPS로 변경하십시오.

+0

안녕하세요. 회신 해 주셔서 감사합니다. 나는 기본 주소를 https ''로 설정했지만 여전히 같은 오류가 발생합니다. – WillMcKill

+0

익명 처리 후 전체 바인딩을 게시 할 수 있습니까? – Aliostad