向wcf端点添加安全绑定

向wcf端点添加安全绑定,wcf,wcf-security,Wcf,Wcf Security,我已在下面的配置中添加了一个绑定: <services> <service name="MyNamespace.Service.ServiceName.ServiceEndPoint"> <endpoint address="http://localhost:8012/ServiceEndPoint" binding="webHttpBinding" contract="MyNamespace.Service.ServiceName.IService

我已在下面的配置中添加了一个绑定:

<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>

因此,我添加了binding=“webHttpBinding”,以确保端点的安全。以下是我的相应配置:

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

但这似乎并没有确保终点。我已经在Firefox上尝试过了,以确认IE没有自动进行身份验证,并检查了firebug中的标题

有人能告诉我正确的配置方向吗

谢谢,
Matt

您忘记设置
bindingConfiguration

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

在绑定中,您配置了一个
wsHttpBinding
,在服务端点中,您指定了一个
webHttpBinding
。我想您希望将端点绑定设置为
wsHttpBinding

检查WCF绑定