WCF net.tcp 颁发的令牌

WCF net.tcp issued token

有没有人有使用 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。有人吗?

我通过设置 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>`