Tony

Tony

  • NA
  • 1
  • 0

WebClient error - The remote name could not be resolved: 'snooker'

Nov 5 2009 4:17 AM
Hi all!

I'm trying to download an xml file from a location using the WebClient class.

When I try a normal web address like "http://www.bbc.co.uk" there is no problem. However, when i try this kind of address "http://snooker/somedomain.com/" I get the error The remote name could not be resolved: 'snooker'.

Here is my code:

WebClient wcWebClient = new WebClient();

wcWebClient.Headers.Add("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1;en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4");

wcWebClient.Headers.Add("Accept-Language", "en-us,en;q=0.5");

byte[] reqHTML = null;

//next line is where i get the error
reqHTML = wcWebClient.DownloadData("http://snooker/somedomain.com/");

Any help and/or advice to resolve this will be gratefully received.

Many thanks in advance.
Tony

Answers (1)