【问题标题】:Authentication failed on the remote side (the stream might still be available for additional authentication attempts)远程身份验证失败(流可能仍可用于其他身份验证尝试)
【发布时间】:2023-03-27 23:45:01
【问题描述】:

我有一个在客户端和服务器之间使用 WCF 的应用程序,但是,当我尝试运行我的应用程序时,它给了我这个异常。我发现的一种解决方案是在两台机器之间连接一条直接电缆(不使用路由器或交换机)。

这是我的客户端配置:

<netTcpBinding>
    <binding name="NetTcpBinding_IOperacao" closeTimeout="00:15:00"
      openTimeout="00:15:00" receiveTimeout="00:15:00" sendTimeout="00:15:00"
      transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
      hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="21474836470"
      maxBufferSize="2147483647" maxConnections="1000000" maxReceivedMessageSize="2147483647">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
        maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <reliableSession ordered="true" inactivityTimeout="00:10:00"
        enabled="false" />
      <!--<security mode="Transport">
        <transport clientCredentialType="Windows" protectionLevel="None" />
        <message clientCredentialType="Windows" />
      </security>-->
      <security mode="None"></security>
    </binding>
    <!--<binding name="NetTcpBinding_IOperacao1">
      <security>
        <transport protectionLevel="None" />
      </security>
    </binding>-->
  </netTcpBinding>

【问题讨论】:

    标签: c# wcf


    【解决方案1】:

    我将您的错误与另一个错误结合在一起。调用 wcf 服务时,我以为是防火墙或其他东西阻止了我机器上的流量。

    最终是由于创建客户端后没有正确设置用户名和密码造成的。有关如何修复它的详细信息,请参阅我在另一篇文章中的解决方案:https://stackoverflow.com/a/60010234/151325

    【讨论】:

      猜你喜欢
      • 2014-05-29
      • 2014-07-05
      • 2018-11-02
      • 2017-11-27
      • 1970-01-01
      • 1970-01-01
      • 2022-01-04
      • 2014-01-24
      相关资源
      最近更新 更多