System.Net.ServicePointManager.Expect100Continue = false;
HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create("http://en.wikipedia.org/w/api.php?action=query&titles=Car");
using (HttpWebResponse response = (HttpWebResponse)myRequest.GetResponse())
{
string ResponseText;
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
ResponseText = reader.ReadToEnd();
}
SearchString.Text = ResponseText;
}
and the error is
The remote server returned error 403.
Sam HobbsPosted May 17, 2011, 1:14 AM
Suthish NairPosted May 16, 2011, 6:59 AM
Posted May 16, 2011, 4:44 AM
Fixing 403 errors - CheckUpDown