2013-07-03 40 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;