Why am I getting an "Unable to connect to remote server" err

Screen Scraping and can't connect to net through visual studio 8

Page 1 of 1

0 Replies - 1297 Views - Last Post: 24 October 2009 - 11:50 PM Rate Topic: -----

#1 saniamir  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-October 09

Why am I getting an "Unable to connect to remote server" err

Post icon  Posted 24 October 2009 - 11:50 PM

I wrote a screen scraping method that gives me the following error:
"unable to connect to remote server"

I use Windows 7 and I've checked Windows Firewall. It didn't correct the error. I'd appreciate any tips. Here's the C# code:

		private void button1_Click(object sender, EventArgs e)
		{
			WebClient webClient = new WebClient(); 
			const string strUrl = "http://www.yahoo.com/"; 
			byte[] reqHTML; 
			reqHTML = webClient.DownloadData(strUrl); 
			UTF8Encoding objUTF8 = new UTF8Encoding(); 
			textBox2.Text = objUTF8.GetString(reqHTML); 
		}



Thanks!!

Is This A Good Question/Topic? 0
  • +

Page 1 of 1