2

添加对服务的引用会产生使用 NTLM 的绑定,因此应正确配置服务。在同一台计算机上运行的服务客户端(目前)实例化一个新的 BasicHttpBinding,将 ClientCredentialType 设置为 Ntlm,将 AllowNtlm 设置为 true,甚至(在某些测试中)将 Credentials.Windows.ClientCredential 设置为 DefaultNetworkCredentials 或特定的 NetworkCredentials。

无论我做什么,Thread.CurrentPrinciple 在服务端始终是匿名的,ServiceSecurityContext.Current.WindowsIdentity 同样是空的。

我在这里做错了什么?

4

0 回答 0