thumky
asked on
"The remote name could not be resolved" on WebRequests
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!!!
System.Net.WebException: The remote name could not be resolved: 'www.microsoft.com'
at System.Net.HttpWebRequest.
on any kind of WebRequest, such as:
WebRequest req2 = WebRequest.Create("http://www.microsoft.com");
WebResponse res2 = req2.GetResponse();
or
FtpWebRequest req = (FtpWebRequest)WebRequest.
req.Method = WebRequestMethods.Ftp.ListDirectory;
req.Credentials = new NetworkCredential(username
req.KeepAlive = false;
req.UseBinary = true;
req.UsePassive = false;
req.CachePolicy = new RequestCachePolicy(Request
res = (FtpWebResponse)req.GetRes
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!!!
ASKER
AHA!! I found an exe i compiled before my upgrade. It ran perfectly! So its not the network, its the new Visual Studio environment.
Any thoughts?
Any thoughts?
ASKER
this is .NET Framwork 2.0. I'm going to rebuild the project from scratch
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER