http webrequest
-
when i try to get this link http://www.yellowpages.com.au/qld/gatton/a-12000029-listing.html[^] using HttpWebRequest request = (HttpWebRequest)WebRequest.Create(link); request.AllowAutoRedirect = true; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream resStream = response.GetResponseStream(); StreamReader objSR; objSR = new StreamReader(resStream, System.Text.Encoding.GetEncoding("utf-8")); string sResponse = objSR.ReadToEnd(); i don't get any response from server please help why this happen
Palestine
-
when i try to get this link http://www.yellowpages.com.au/qld/gatton/a-12000029-listing.html[^] using HttpWebRequest request = (HttpWebRequest)WebRequest.Create(link); request.AllowAutoRedirect = true; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream resStream = response.GetResponseStream(); StreamReader objSR; objSR = new StreamReader(resStream, System.Text.Encoding.GetEncoding("utf-8")); string sResponse = objSR.ReadToEnd(); i don't get any response from server please help why this happen
Palestine
Put a try/catch block around your code, and run it under the debugger so you can see why you're not getting a response.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997