如何在ASP.NET中使用Windows Live Contact API? [英] How to use the Windows Live Contact API with ASP.NET?

查看:81
本文介绍了如何在ASP.NET中使用Windows Live Contact API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从用户那里获取所有hotmail联系人.我正在尝试遵循Microsoft Live Contact API Beta 1.0( http://msdn.microsoft.com /en-us/library/bb463989.aspx [ ^ ]),但无法获取.我可以获得正确的同意令牌,但是当尝试查询https://livecontacts.services.live.com/users/@L@<lid>/rest/livecontacts时,出现(401)未经授权的错误.有人可以帮我吗?
谢谢!

Hi, i''m trying to get all the hotmail contacts from a user. I''m trying to follow the Microsoft Live Contact API Beta 1.0 (http://msdn.microsoft.com/en-us/library/bb463989.aspx[^]) but can''t get it. I can get the correct consent token, but when trying to query https://livecontacts.services.live.com/users/@L@<lid>/rest/livecontacts i get an (401) Unauthorized error. Someone can help me with this?
Thank you!

推荐答案

您正在使用ASP.NET的事实是无关紧要的,因为您的服务器可以完成所有工作,所以代码是相同的如果它是Windows应用程序.我要做两件事:

1-从MS在Windows应用程序中提供的示例代码开始,然后查看它是否有效
2-将代码移到您的Web服务器上,看看是否可行

可能是您的代码已损坏,或者由于某些原因它无法回复您的虚拟主机.

我能想到的另一件事是,当您使用ASP.NET时,我假设所有代码都在同一页面生命周期内运行.如果不是,那么它将不起作用,因为您的所有变量(例如令牌)都可能会被重置.
The fact that you''re using ASP.NET is irrelevant, b/c your server does all the work, the code would be the same if it was a windows app. I''d do two things:

1 - start with sample code that MS provides, in a windows app, and see if it works
2 - move that code onto your web server and see if that works

The possible things are that your code is broken, or there''s some reason why it won''t reply to your web host.

The other thing I can think of, is that as you''re using ASP.NET, I assume all your code runs within the same page lifecycle. If not, then it would not work, because all your variables, such as your token, may be being reset.


这篇关于如何在ASP.NET中使用Windows Live Contact API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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