服务器已拒绝客户端凭据,双工wcf服务
问题描述:
我在Windows服务上使用tcp绑定托管wcf服务。它的工作原理正确我们的局域网上,但是当用户想连接到由互联网服务时,他们收到以下错误:服务器已拒绝客户端凭据,双工wcf服务
The server has rejected the client credentials
这是我的服务配置:
service behaviorConfiguration="WcfServiceLibrary1.Service1Behavior"
name="LivePushServiceLib.SubscribeService">
<endpoint address="" binding="netTcpBinding" bindingConfiguration=""
contract="WCF_Interface.ISubscribeService">
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://188.x.x.x:8524/SubscribeService.svc" />
</baseAddresses>
</host>
</service>
</services>
答
您正在使用默认的安全与NetTcpBinding这是Windows。在你的局域网中,我假设每个人都很高兴地使用Windows凭据。但是,如果你想在安全设置喜欢的东西TransportWithMessageCredential在互联网上的外观使用,然后使用凭据类型的用户名从互联网的人都不太可能对您的域名
凭据。这允许基于Internet的客户端使用您可以在自定义用户名中验证的用户名进行身份验证UsernamePasswordValidator