我有一个带有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)
Run Code Online (Sandbox Code Playgroud)
尝试搜索解决方案,但发现没有符合我的要求,因此发布在这里.
可能是什么问题呢?
如果我在客户端上将我的安全模式设置为"无"
<security mode="None"></security>
Run Code Online (Sandbox Code Playgroud)
我收到另一个错误:
错误:套接字连接已中止.这可能是由于处理消息的错误或远程主机超出接收超时或基础网络资源问题引起的.本地套接字超时为'00:00:59.5149722'.