.net – The remote name could not be resolved

netwindows-mobile

i m creating mobile application for windows mobile 6.i m uploading an image on url/website.
for this i m using webrequest and webresponse class.at the time of getting response i m getting this type of error-

The remote name could not be resolved..
my code is-
String url = "http://weblogs.asp.net/scottgu/rss.aspx";
System.Net.WebRequest request = System.Net.WebRequest.Create(url);
request.Credentials = System.Net.CredentialCache.DefaultCredentials;

        System.Net.WebResponse response = null;
        System.IO.Stream stream = null;
        response = request.GetResponse();
        stream = response.GetResponseStream();

any one can help me..
thx in Advance…
Regards
Pankaj Pareek

Best Answer

While I don't have specific experience with Windows Mobile this error message generally indicates a failure to resolve a hostname to an IP address. This can happen for a number of reasins including:

  • The client can not contact the DNS server to attempt to resolve the name. This suggests a lack of network and/or internet connectivity
  • The DNS query did not yeild a result.

Resolution Suggestions:

  1. Check that the name is correctly specified
  2. Verify that there is network connectivity as this is required to communicate with the DNS server(s) used to resolve a hostname
  3. Check that the DNS server address is correct especially if they are configured staticlly.

Hope this helps