2013-07-03 100 views
0

我在C#中编写了一个程序,它使用NTLM身份验证(Sharepoint 2010服务器,通过SOAP)访问Web服务。现在我想将此程序移植到Windows 8应用程序。Windows 8应用NTLM验证

在我PROGRAMM我用我的App.config以下设置,以允许使用Windows登录凭据:

<security mode="TransportCredentialOnly"> 
    <transport clientCredentialType="Ntlm"/> 
</security> 

因为这不是在Windows 8应用可能,我怎么能仍然达到这个?

回答

0

您需要手动编码。我已经能够连接到我的SP使用:

BasicHttpBinding MyHttpBinding = new BasicHttpBinding();

MyHttpBinding.Security.Mode = BasicHttpSecurityMode.Transport;

MyHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;