WCF服务器拒绝来自localhost的连接

时间:2011-10-21 11:02:36

标签: wcf c#-4.0 wcf-binding wcf-security

我在我的计算机上运行的托管应用程序内的net.tcp端口上运行WCF服务 - Windows 2003 64位。

应用程序将接受来自同事机器的连接以及来自WCF测试客户端的本地连接,并发送回适当的信息。我也可以使用我的客户端连接到同事机器上运行的服务。

不幸的是,它不允许我从我的机器上运行的客户端连接到服务。同事机器上的客户端与同事机器上的服务器也失败了。

令人困惑的是,该应用程序还运行另一项本地和远程工作正常的服务。

This works:  net.tcp://localhost:8736/EchoExcelServices/
This doesnt: net.tcp://localhost:8736/EchoExcelServices/Uploader

客户端应用程序中给出的例外是SecurityNegotiatanException,其中包含消息

The server has rejected the client credentials

在其中(几层向下)是Win32Exception,带有消息

The logon attempt failed

编辑:行为部分如下:

 <behaviors>
      <serviceBehaviors>
        <behavior name="EchoExcelLibrary.MetadataBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
          <behavior name="ImpersonationBehavior">
          <clientCredentials>
            <windows allowedImpersonationLevel="Impersonation"/>
          </clientCredentials>
        </behavior>
      </endpointBehaviors>

编辑2 行为改变了:

  <endpointBehaviors>
    <behavior name="ImpersonationBehavior">
    </behavior>
  </endpointBehaviors>

1 个答案:

答案 0 :(得分:0)

这是在我们的机器上设置DTC的问题。它现在已经解决了

相关问题