从Windows 8访问WCF服务

时间:2013-02-14 10:40:51

标签: c# wcf windows-8

我正在尝试从Windows 8设备访问网络服务。我需要提供的凭据是托管ECF服务的域的域帐户。我的Windows 8设备不在此域中(因为它应该在WinRT设备上运行,它可能根本不在域中。)

我无法让身份验证工作。我尝试使用HttpCredentialTypes Basic,Ntlm和Windows,并尝试将其与设置用户名的不同方法结合起来。

我收到此错误:

The authentication header received from the server was 'Negotiate,NTLM,Basic realm="webservice.company.com"'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.

我还尝试更改SecurityMode(Transport,TransportWithMessageCredential),但这没有帮助。

当我尝试使用本地帐户(即网络服务器本地帐户)访问服务时,它使用基本和传输。

编辑:Web服务通过SSL工作,因此我必须使用https。

0 个答案:

没有答案
相关问题