如何将以下wsHttpBinding转换为customBinding?我需要这样做,以便可以增加时钟偏斜。这是给http的。

 <wsHttpBinding>
    <binding name="wsHttpSecurityOptions" maxReceivedMessageSize="10485760" maxBufferPoolSize="524288">
      <security mode="Message">
        <message clientCredentialType="UserName" establishSecurityContext="true" negotiateServiceCredential="true"/>
        <transport clientCredentialType="Certificate" proxyCredentialType="None"/>
      </security>
      <readerQuotas maxStringContentLength="500000"/>
    </binding>
  </wsHttpBinding>

我的尝试(如下所示)失败,并显示错误消息“找不到具有绑定(bind)CustomBinding的终结点的匹配方案https的基地址”,但是我看不到如何配置UserName消息模式安全性。
  <customBinding>
    <binding name="wsHttpSecurityOptions">
      <transactionFlow />
      <security authenticationMode="UserNameForSslNegotiated">
        <secureConversationBootstrap authenticationMode="UserNameForSslNegotiated">
          <localServiceSettings maxClockSkew="00:10:00" />
        </secureConversationBootstrap>
        <localServiceSettings maxClockSkew="00:10:00" />
      </security>
      <textMessageEncoding>
        <readerQuotas maxStringContentLength="500000"/>
      </textMessageEncoding>
      <httpsTransport maxReceivedMessageSize="10485760" maxBufferPoolSize="524288" />
    </binding>
  </customBinding>

最佳答案

经过更多搜索后,我发现Yaron Naveh的cool tool进行了转换,产生了以下结果(我将时钟偏斜添加进去了)

  <customBinding>
    <binding name="wsHttpSecurityOptions">
      <transactionFlow />
      <security authenticationMode="SecureConversation" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
        <secureConversationBootstrap authenticationMode="UserNameForSslNegotiated" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
          <localServiceSettings maxClockSkew="00:10:00" />
        </secureConversationBootstrap>
        <localServiceSettings maxClockSkew="00:10:00" />
      </security>
      <textMessageEncoding />
      <httpTransport maxBufferSize="10485760" maxReceivedMessageSize="10485760" />
    </binding>
  </customBinding>

再次感谢Yaron,我希望在问完另一个问题后找到它(我在问了50分钟后就自己回答了(对我来说是一个记录:))

10-08 15:32