【发布时间】:2011-12-12 12:09:38
【问题描述】:
我的计算机上运行的托管应用程序内的 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>
【问题讨论】:
-
为您的服务配置了什么类型的安全模式?
-
我已经添加了上面的行为部分。这就是你要找的东西吗?
-
删除客户端凭据,看看是否有区别(仅用于故障排除目的)。
-
这并没有改变行为。我在上面添加了编辑过的行为部分。
标签: wcf c#-4.0 wcf-binding wcf-security