[C#/WCF] Https 웹서비스 오류 (WebHttpBinding, endpoint, web.config)

WCF Https 웹서비스 오류 해결 방법


WebHttpBinding 바인딩의 끝점에 대해 http 구성표와 일치하는 기본 주소가 없습니다. 등록된 기본 주소 구성표는 [https] 입니다.


Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https]



Web.config 파일에 bindings 부분을 추가해 주면 해결된다. 



 Web.Config 

<system.serviceModel>
    <services>
      <service behaviorConfiguration="MOBILE_BROKER.ServiceBehavior"
        name="MOBILE_BROKER.Service">
        <endpoint address="" behaviorConfiguration="MOBILE_BROKER.ServiceBehavior" 
                  binding="webHttpBinding" bindingConfiguration="webHttpsBinding" contract="MOBILE_BROKER.IService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>          
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="webHttpsBinding">
          <security mode="Transport">
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </webHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="MOBILE_BROKER.ServiceBehavior">
          <serviceMetadata httpsGetEnabled="true" />          
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="MOBILE_BROKER.ServiceBehavior">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>  
  </system.serviceModel>


 

댓글

Designed by JB FACTORY