I'm getting this error:
System.Net.WebException: The remote name could not be resolved: '
www.microsoft.com' at System.Net.HttpWebRequest.
GetRespons
e()
on any kind of WebRequest, such as:
WebRequest req2 = WebRequest.Create("
http://www.microsoft.com");
WebResponse res2 = req2.GetResponse();
or
FtpWebRequest req = (FtpWebRequest)WebRequest.
Create("
ftp://" + host );
req.Method = WebRequestMethods.
Ftp.ListDirectory;
req.Credentials = new NetworkCredential(username
, password);
req.KeepAlive = false;
req.UseBinary = true;
req.UsePassive = false;
req.CachePolicy = new RequestCachePolicy(Request
CacheLevel
.BypassCac
he);
res = (FtpWebResponse)req.GetRes
ponse();
I can reach these hosts via browser or command line. There is no proxy server. My Windows Firewall is disabled and my Kaspersky Internet Security software is turned off. This USED TO WORK YESTERDAY!! The only thing i did was upgrade from Visual Studio 2008 Express to Pro. I re-opened up the project in Express and it still fails. I suspect the install changed permissions or restrictions. Are there xml files in my project i need to edit? I don't know much about dot net. I'm a Java guy.
Thanks!!!
Start Free Trial