REST:注销问题 [英] REST: logout problem
本文介绍了REST:注销问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在使用REST并希望拨打电话进行注销。我这样做:
I'm using REST and want to make a call to signout. I'm doing that:
string url= "https://login.live.com/oauth20_logout.srf?client_id=MyClient_ID&redirect_uri=MyredirectURL;
WebClient wc = new WebClient();
wc.DownloadString(url);
这引发了我异常错误请求
This thrown me an exception Bad Request
然后我试过:
string url= "https://login.live.com/oauth20_logout.srf?client_id=MyClient_ID&redirect_uri=MyredirectURL;
HttpWebRequest request = WebRequest.Create(signout) as HttpWebRequest;
request.Method = "POST";
request.ContentType = "text/html, application/x-www-form-urlencoded";
HttpWebResponse respone = request.GetResponse() as HttpWebResponse;
抛出另一个异常441
another exception thrown 441
请帮助!
推荐答案
快速健全性检查:
Quick sanity check:
我假设您在"MyClient_ID"中添加了应用的客户ID。 ,并根据此链接:
I assume you're putting in the client ID of your app in "MyClient_ID", and as per this link:
http: //msdn.microsoft.com/en-us/library/live/hh243649.aspx#signout
redirect_uri是否与您在manage.dev.live中指定的那个匹配.com?
does the redirect_uri match the one you specified at manage.dev.live.com?
如果那不是问题,你回复的回复主体是什么?
If that's not the issue, what's the body of the response that you're getting back?
这篇关于REST:注销问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文