0

I have added a binding to the config below:

<services> 
  <service name="MyNamespace.Service.ServiceName.ServiceEndPoint"> 
    <endpoint address="http://localhost:8012/ServiceEndPoint" binding="webHttpBinding" contract="MyNamespace.Service.ServiceName.IServiceEndPoint" behaviorConfiguration="webHttp" name="ServiceName"/>

  </service> 
</services> 
<behaviors> 
  <endpointBehaviors> 
    <behavior name="webHttp"> 
      <webHttp/> 
    </behavior> 
  </endpointBehaviors> 
</behaviors>

So I've added the binding="webHttpBinding" as I'd like to secure the end point. Here's the corresponding config I have:

<bindings> 
  <wsHttpBinding> 
    <binding name="ServiceName"> 
      <security mode="Transport"> 
        <transport clientCredentialType="Windows" /> 
      </security> 
    </binding> 
  </wsHttpBinding> 
</bindings>

but this appears to not be securing the end point. I've tried this with Firefox to confirm IE isn't automatically authenticating and checked the headers in firebug.

Can anyone point me in the direction of the right config for doing this?

Thanks, Matt

Matt
  • 1,931
  • 12
  • 20

2 Answers2

0

you forget to set bindingConfiguration

<endpoint address="http://localhost:8012/ServiceEndPoint" binding="webHttpBinding" contract="MyNamespace.Service.ServiceName.IServiceEndPoint" behaviorConfiguration="webHttp" name="ServiceNameEndpoint" bindingConfiguration="ServiceName"/>
burning_LEGION
  • 13,246
  • 8
  • 40
  • 52
0

In your binding you have configured a wsHttpBinding and in your service endpoint you have specified a webHttpBinding. I think you want your endpoint binding to be set to wsHttpBinding.

Check this link on WCF Bindings.

Tanner
  • 22,205
  • 9
  • 65
  • 83