WCF 服务器拒绝来自本地主机的连接

发布于 2024-12-11 05:10:09 字数 1486 浏览 0 评论 0原文

我有一个 WCF 服务在我的计算机上运行的托管应用程序的 net.tcp 端口上运行 - 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>

I have a WCF service running on a net.tcp port inside a hosting application running on my computer - Windows 2003 64 bit.

The application will accept connections from a colleague's machine and locally from the WCF Test Client and sends back the appropriate information. I can also use my client to connect to the service running on my colleague's machine.

Unfortunately it won't allow me to connect to the service from the client running on my machine. Client on my colleague's machine with server on colleague's machine also fails.

Confusingly, the app also runs another service which works fine locally and remotely.

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

The exception given in the client app is a SecurityNegotiatanException with the message

The server has rejected the client credentials

Inside it (a couple of layers down) is a Win32Exception with the message

The logon attempt failed

EDIT: The behaviours section is as follows:

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

EDIT 2
altered behaviours secion:

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧城空念 2024-12-18 05:10:10

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

This was a problem with the setup of DTC on our machines. It is now resolved

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文