Windows Phone 7的Twitter客户端未处理WebException [英] WebException unhandled in Twitter Client for Windows Phone 7

查看:114
本文介绍了Windows Phone 7的Twitter客户端未处理WebException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循此网站上的示例:
http://channel9.msdn.com/Shows/SilverlightTV/Silverlight-TV-17-Build-a-Twitter-Client-for-Windows-Phone-7-with-Silverlight

私有无效的GetResponseCallback(IAsyncResult异步结果)
{
StateObject状态=异步结果.AsyncState作为StateObject;
HttpWebRequest request = state.Request;
StreamReader reader = null;
WebResponse响应= request.EndGetResponse(asynchronousResult);
reader = new StreamReader(response.GetResponseStream());
XDocument xmlWeatherDoc = XDocument.Parse(reader.ReadToEnd());
..........
}

在此特定方法中,在此行:
WebResponse响应= request.EndGetResponse(asynchronousResult);

表示未处理WebException [远程服务器返回错误:NotFound.]
谁能告诉我如何解决这个问题?谢谢!!

I following the example on this website:
http://channel9.msdn.com/Shows/SilverlightTV/Silverlight-TV-17-Build-a-Twitter-Client-for-Windows-Phone-7-with-Silverlight

private void GetResponseCallback(IAsyncResult asynchronousResult)
{
StateObject state = asynchronousResult.AsyncState as StateObject;
HttpWebRequest request = state.Request;
StreamReader reader = null;
WebResponse response = request.EndGetResponse(asynchronousResult);
reader = new StreamReader(response.GetResponseStream());
XDocument xmlWeatherDoc = XDocument.Parse(reader.ReadToEnd());
..........
}

In this particular method, at this line:
WebResponse response = request.EndGetResponse(asynchronousResult);

It says WebException was unhandled [The remote server returned an error: NotFound.]
Can anyone tell me how to fix this?? thanks!!

推荐答案

再次阅读错误消息.您没有显示请求的内容,因此您输错了URL或Twitter不再理解该URL.

找不到您要求的页面.您唯一可以做的就是将您请求的URL更改为Twitter可以理解的内容.
Read the error message again. You''re not showing what the request was, so you either mistyped the URL or the URL is understood by Twitter anymore.

The page you requested wasn''t found. The only thing you can do is change the URL you requested to something Twitter understands.


这篇关于Windows Phone 7的Twitter客户端未处理WebException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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