- SharePoint 门户处于声明模式,服务托管在 /_vti_bin 中。
- 根据http://msdn.microsoft.com/en-us/library/ff521586.aspx ,我正在使用 MultipleBaseAddressBasicHttpBindingServiceHostFactory 。
添加对服务的引用会产生应使用 NTLM 的绑定,因此应正确配置服务。在同一台计算机上运行的服务客户端(目前)实例化一个新的 BasicHttpBinding,将 ClientCredentialType 设置为 Ntlm,将 AllowNtlm 设置为 true,甚至(在某些测试中)将 Credentials.Windows.ClientCredential 设置为 DefaultNetworkCredentials 或特定的 NetworkCredentials。
无论我做什么,Thread.CurrentPrinciple 在服务端始终是匿名的,ServiceSecurityContext.Current.WindowsIdentity 同样是空的。
我在这里做错了什么?