有没有人有使用net.tcp和已发行 token 的消息安全性模式的最新示例。我目前有一个发布 token 的安全 token 服务,但不确定如何使用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获得了一个工作版本。我也不想参加 session ,因此也删除了安全对话。

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

关于WCF net.tcp发行 token ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33482505/

10-12 00:33
查看更多