【问题标题】:WCF net.tcp issued tokenWCF net.tcp 颁发的令牌
【发布时间】:2016-02-02 14:59:43
【问题描述】:

有没有人有使用 net.tcp 的当前示例和已发布令牌的消息安全模式。我目前有一个发行令牌的安全令牌服务,但不确定如何使用 net.tcp 对其进行配置。我只看到使用ws2007FederationHttpBinding的例子

<customBinding>
    <binding name="wsFed">
      <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">

        <secureConversationBootstrap authenticationMode="IssuedToken">

          <issuedTokenParameters tokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
            <issuer address="http://localhost/STSWebHost/STSService.svc" binding="ws2007HttpBinding" />
          </issuedTokenParameters>

        </secureConversationBootstrap>
      </security>


      <tcpTransport />

    </binding>
  </customBinding>

我不断收到不支持加密算法的错误?使用 ws2007FederationHttpBinding 可以正常工作,但我需要使用 net.tcp。有人吗?

【问题讨论】:

  • 我做了,但是使用带有令牌的 net.tcp 进行自定义绑定没有任何意义。
  • 我有一个使用 wsHttpBinding 的令牌服务,但我想通过 net.tcp 将令牌用于该服务,因为我在防火墙后面。我了解其他绑定,但不熟悉 net.tcp 绑定,但我在下面有一个示例。

标签: wcf wif


【解决方案1】:

通过设置 allowInsecureTransport=true,我有一个工作版本。我还删除了secureconversation,因为我不想要会话。

<customBinding>
    <binding
     name="netTcpFederated">
      <security
        authenticationMode="IssuedTokenOverTransport"
        allowInsecureTransport="true" >

        <issuedTokenParameters keyType="BearerKey" />

      </security>

      <binaryMessageEncoding>
        <readerQuotas
          maxStringContentLength="1048576"
          maxArrayLength="2097152" />
      </binaryMessageEncoding>

      <tcpTransport
        maxReceivedMessageSize="2162688" />
    </binding>

   </customBinding>`

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-28
    • 1970-01-01
    • 2021-07-04
    • 1970-01-01
    • 2012-07-13
    相关资源
    最近更新 更多