WCF HTTPS

Monday, June 28, 2010 5:54:00 PM
Took me a few hours and reading a few posts until I got this working. It seems that you must have the service published on HTTP even if you require HTTPS.
 
 <system.serviceModel>
    <serviceHostingEnvironmentaspNetCompatibilityEnabled="false" />
 
    <services>
      <servicename="Xxxx.API.Order.Sale"behaviorConfiguration="Xxxx.API.Order.SaleBehavior">
        <host>
          <baseAddresses>
            <addbaseAddress="https://zzzz.com/xxxxapi_wcf"/>
          </baseAddresses>
        </host>
        <!-- Service Endpoints -->
        <endpointaddress="https://zzzz.com/xxxxapi_wcf/xxxx.svc"binding="wsHttpBinding"bindingConfiguration="HttpsBinding"contract="Xxxx.API.Order.ISale">
 
          <identity>
            <dnsvalue="zzzz.com"/>
          </identity>
        </endpoint>
      </service>
    </services>
    <bindings>
      <wsHttpBinding>
        <bindingname="HttpsBinding">
          <securitymode="Transport">
            <transportclientCredentialType="None"/>
 
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
 
    <behaviors>
      <serviceBehaviors>
        <behaviorname="Xxxx.API.Order.SaleBehavior">
          <serviceMetadatahttpsGetEnabled="true"httpGetUrl="http://zzzz.com/xxxxapi_wcf/xxxx.svc/mex"httpsGetUrl="https://zzzz.com/xxxxapi_wcf/xxxx.svc/mex"httpGetEnabled="true"/>
          <serviceDebugincludeExceptionDetailInFaults="true"/>
 
        </behavior>
      </serviceBehaviors>
    </behaviors>
 </system.serviceModel>
</configuration>
Share This Using Popular Bookmarking Services
You must sign in to this site to post comments.
Site Map | Printable View | © 2008 - 2012 NuRoN Consulting, INC | Powered by mojoPortal | HTML 5 | CSS | Original design by Andreas Viklund
Share This Using Popular Bookmarking Services