我有一个带有 net.tcp 绑定的 WCF 服务,作为 Windows 服务托管在服务器上。我无法访问此服务。但是,当我将它托管在本地网络上时,我能够这样做。
收到错误
消息:** 服务器已拒绝客户端凭据。
内部异常:
System.Security.Authentication.InvalidCredentialException:
The server has rejected the client credentials.
---> System.ComponentModel.Win32Exception:
The logon attempt failed --- End of inner exception stack trace
--- at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
尝试搜索解决方案,但没有找到符合我要求的解决方案,因此在此处发布。
可能是什么问题呢?
如果我在客户端将我的安全模式设置为无
<security mode="None"></security>
我得到另一个错误:
错误:套接字连接被中止。这可能是由于处理您的消息时出错或远程主机超出接收超时,或者是潜在的网络资源问题造成的。本地套接字超时为“00:00:59.5149722”。