WCF 服务器拒绝来自本地主机的连接
我有一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我们机器上 DTC 设置的问题。现在已经解决了
This was a problem with the setup of DTC on our machines. It is now resolved