开发者

WCF service in SharePoint 2010 doesn't do impersionation, or even pass credentials

开发者 https://www.devze.com 2023-03-08 09:36 出处:网络
The SharePoint portal is in Claims mode, and the service is hosted in /_vti_bin. I\'m using the MultipleBaseAddressBasicHttpBindingServiceHostFactory, as per http://msdn.microsoft.com/en-us/library/f
  • The SharePoint portal is in Claims mode, and the service is hosted in /_vti_bin.
  • I'm using the MultipleBaseAddressBasicHttpBindingServiceHostFactory, as per http://msdn.microsoft.com/en-us/library/ff521586.aspx.

Adding a reference to the service 开发者_JAVA百科yields a binding which should use NTLM, so the service should be configured correctly. The service client, which runs on the same computer (for now) instantiates a new BasicHttpBinding, sets ClientCredentialType to Ntlm, AllowNtlm to true and even (in some tests) the Credentials.Windows.ClientCredential to DefaultNetworkCredentials or specific NetworkCredentials.

No matter what I do, the Thread.CurrentPrinciple is always anonymous on the service side, and ServiceSecurityContext.Current.WindowsIdentity is equally empty.

What am I doing wrong here?

0

精彩评论

暂无评论...
验证码 换一张
取 消