Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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!!
Posted

1 solution

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.
 
Share this answer
 
Comments
xbolslock 12-Feb-12 0:19am    
I do not know what is wrong. i check everything with how he do in the video and everything is correct.
Dave Kreskowiak 12-Feb-12 9:20am    
Read the error message again, and again. The code works. THE URL YOU ARE TELL IT TO GO GET DOESN'T EXIST! Twitter cannot find the page you are looking for.
xbolslock 12-Feb-12 19:45pm    
okay okay. then what would be the updated url?
Dave Kreskowiak 12-Feb-12 20:16pm    
How the hell am I supposed to know? I have no idea what you're after.

Find whatever you want in a web browser and copy and paste the URL when you find it.

Better yet, abandon this version and go here: https://dev.twitter.com/
You'll get a much better result without all the work of parsing an HTML page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900