c# - "An unsecured or incorrectly secured fault was received from the other party"

标签 c# wpf wcf

我得到:

Error

"An unsecured or incorrectly secured fault was received from the other party. See the inner Fault Exception for the fault code and detail."

我已经在客户端完成了此操作,并且在控制台应用程序中也做了同样的操作,但出现的错误可能是某种冲突。

我也检查了 app.config

代码是:

<client>
  <endpoint address="net.tcp://localhost:5054/player" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IPlayerService" contract="PlayerService.IPlayerService" name="NetTcpBinding_IPlayerService">
    <identity>
      <dns value="pident.cloudapp.net"/>
    </identity>
  </endpoint>
  <endpoint address="net.tcp://localhost:5049/public" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IPublicService" contract="Public Service.IPublicService" name="NetTcpBinding_IPublicService"/>
  <endpoint address="net.tcp://localhost:5051/user" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IUserService" contract="User Service.IUserService" name="NetTcpBinding_IUserService">
    <identity>
      <dns value="pident.cloudapp.net"/>
    </identity>
  </endpoint>

有人知道吗?

最佳答案

我刚遇到这个问题,不得不关闭 WCF 绑定(bind)上的安全上下文。您需要在客户端和服务的绑定(bind)上关闭它们。

如果您的 WCF 是 IIS 托管的,则这是配置文件:

<ws2007FederationHttpBinding>
    <binding>
        <security mode="TransportWithMessageCredential">
            <message establishSecurityContext="false" />
        </security>
    </binding>
</ws2007FederationHttpBinding>

查看这篇文章: http://stack247.wordpress.com/2013/05/28/an-unsecured-or-incorrectly-secured-fault-was-received-from-the-other-party/

关于c# - "An unsecured or incorrectly secured fault was received from the other party",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15893286/

相关文章:

c# - 软件架构与数据库设计 : One database/web application per each company or one database/web application for all companies?

c# - 检测图中异常快速的跳跃

c# - 没有符号的货币格式

WPF - 宽度为 ="*"的 DataGrid 列,但 MinWidth 以适合内容

javascript - Wcf Rest 服务因参数化查询而失败

c# - 是否可以通过 Wcftest 客户端测试 WCF throttle 行为?

c# - 如何从 ASPx 页面向 sqlserver 发送一个 ref int 值?

c# - 添加到表单的控件没有名称

c# - WPF Web浏览器故障

c# - netsh http 通过组策略 (GPO) 添加 urlacl