0

I have a WCF service that needs to hosted using basicHttpBinding using SSL. So my team has installed a SSL certificate with Anonymous authentication enabled and a hardcoded username and password given in IIS. I tried giving this binding

 <binding name="SecurityByTransport">
               <security mode="Transport">
                 <transport clientCredentialType="Windows" />
                </security>
            </binding>   

But it still doesnt work. I get this error "Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [https]. "

ServiceModel section:

 <system.serviceModel>
<diagnostics>
  <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtTransportLevel="true" />
</diagnostics>
<bindings>
  <customBinding>
    <binding name="netTcp">
      <binaryMessageEncoding>
        <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" maxDepth="64" />
      </binaryMessageEncoding>
      <security authenticationMode="UserNameOverTransport" />
      <windowsStreamSecurity />
      <tcpTransport portSharingEnabled="true" maxBufferPoolSize="52428800" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
    </binding>
  </customBinding>

  <basicHttpBinding>
    <binding name="Https">
      <security mode="Transport">

      </security>
    </binding>
  </basicHttpBinding>

</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name ="Https">

      <serviceMetadata httpsGetEnabled="true"/>

      <serviceDebug includeExceptionDetailInFaults="false"/>
      <serviceCredentials>
        <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="Asi.Soa.ServiceModelEx.NullUserNamePasswordValidator, Asi.Soa.ServiceModelEx" />
        <clientCertificate>
          <authentication certificateValidationMode="None" />
        </clientCertificate>
      </serviceCredentials>
      <serviceAuthorization principalPermissionMode="Custom">
        <authorizationPolicies>
          <add policyType="Asi.Soa.ServiceModelEx.ClaimsAuthorizationPolicy, Asi.Soa.ServiceModelEx" />
        </authorizationPolicies>
      </serviceAuthorization>
      <exceptionShielding/>
    </behavior>


  </serviceBehaviors>
  <endpointBehaviors>
    <behavior name="SoapBehavior">

    </behavior>
    <behavior name="RestBehavior">

    </behavior>
    <behavior name="AjaxBehavior">
      <enableWebScript />
    </behavior>
  </endpointBehaviors>
</behaviors>
<services>


  <service name="Asi.Soa.Core.Services.EntityService" >
    <endpoint address="https://10.42.150.122/imis15/EntityService.svc" binding="basicHttpBinding" contract="Asi.Soa.Core.ServiceContracts.IEntityService"
       bindingConfiguration="Https" />
  </service>

</services>

Any help would be appreciated.

Thanks

Deefa
  • 199
  • 1
  • 3
  • 12

3 Answers3

1

Try to add to service behavior setting

      <serviceMetadata httpsGetEnabled="true"/>

Also you should check that endpoind has a setting

      bindingConfiguration="SecurityByTransport"
paramosh
  • 2,258
  • 1
  • 15
  • 23
0

If you are hosting your service in IIS, please try to remove the http binding from the site bindings.

HTH

rauts
  • 1,018
  • 9
  • 21
0

Since you are using the web service on IIS, use HTTPS binding for it considering that you are using SSL certificate.

Mihai H
  • 3,291
  • 4
  • 25
  • 34