在Windows Phone 8中使用Windows身份验证调用Web服务 [英] Calling webservice with Windows Authentication in Windows Phone 8

查看:102
本文介绍了在Windows Phone 8中使用Windows身份验证调用Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Windows Phone 8中使用Windows身份验证调用Web服务(Exchange EWS)。

I am trying to call a webservice (Exchange EWS) with Windows Authentication in Windows Phone 8.

ServiceReference1 ExchangeServicePortTypeClient 客户端
= ServiceReference1 ExchangeServicePortTypeClient ();   ;          


客户
ClientCredentials 用户名 用户名
= @" username" ;

客户端
ClientCredentials 用户名 密码
= <跨度> @"密码" <跨度>
<跨度>

ServiceReference1.ExchangeServicePortTypeClient client = new ServiceReference1.ExchangeServicePortTypeClient();           
client
.ClientCredentials.UserName.UserName = @"username";
client
.ClientCredentials.UserName.Password = @"password";

但我总是得到

远程服务器返回了意外的响应
401 未经授权


Silverlight a
404 响应代码不同的

The remote server returned an unexpected response: (401) Unauthorized.
In Silverlight, a 404 response code may be reported even when the service sends a different

我做错了什么?

BR,

Jan

推荐答案

试试帖子交换论坛。


这篇关于在Windows Phone 8中使用Windows身份验证调用Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆