将 wsHttpBinding 转换为 customBinding

编程入门 行业动态 更新时间:2024-10-06 08:25:11
本文介绍了将 wsHttpBinding 转换为 customBinding的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

如何将以下 wsHttpBinding 转换为 customBinding?我需要这样做,以便我可以增加时钟偏差.这是用于http.

How do I convert the following wsHttpBinding to a customBinding? I need to so this so I can increase the clock skew. This is for 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>

我的尝试(如下)失败并显示错误消息无法找到与具有绑定 CustomBinding 的端点的方案 https 匹配的基地址",但我看不到如何配置用户名消息模式安全性.

My attempt (as follows) fails with the error message "Could not find a base address that matches scheme https for the endpoint with binding CustomBinding" but I can't see how else to configure UserName Message mode security.

  <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 提供,它进行转换,产生以下结果(我已添加到时钟偏差中)

After some more searching I found a cool tool by Yaron Naveh that does the conversion which produces the following (I've added in the clock skews)

  <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 分钟后自己回答了这个问题(这对我来说是一个记录:))

Thanks again to Yaron and I wish I'd found it before asking another question which I've self answered 50mins after asking it (which is a record for me :))

这篇关于将 wsHttpBinding 转换为 customBinding的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-26 20:44:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1142719.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转换为   wsHttpBinding   customBinding

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!