I'm having some issues with the following code. It'll run fine when Fiddler is on, but it times out when Fiddler isn't running.
IWebProxy proxy = websiterequester.Proxy;
websiterequester = (HttpWebRequest)WebRequest.Create("http://website.com/");
websiterequester.CookieContainer = cookieJar;
websiterequester.Method = "GET";
websiterequester.Referer = "http://website.com/";
if (websiterequester.Proxy != null)
{
websiterequester.Proxy = null;
}
try
{
objStream1 = websiterequester.GetResponse().GetResponseStream();
}
catch (WebException ex)
{
return "oops";
}
objReader1 = new StreamReader(objStream1);
string thiscamebacks = objReader1.ReadToEnd();
Hope you guys have an answer. (I read another thread on SO, but I none of the answers worked for me)
Thanks!