Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

"The remote name could not be resolved" on WebRequests

Posted on 2008-06-25
4
Medium Priority
?
5,674 Views
Last Modified: 2013-12-16
I'm getting this error:

System.Net.WebException: The remote name could not be resolved: 'www.microsoft.com'
   at System.Net.HttpWebRequest.GetResponse()

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(RequestCacheLevel.BypassCache);
            res = (FtpWebResponse)req.GetResponse();

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!!!
0
Comment
Question by:thumky
  • 4
4 Comments
 

Author Comment

by:thumky
ID: 21867342
By the way no firewall changes.  I'm the only one w/ the password.
0
 

Author Comment

by:thumky
ID: 21867409
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?
0
 

Author Comment

by:thumky
ID: 21867562
this is .NET Framwork 2.0.  I'm going to rebuild the project from scratch
0
 

Accepted Solution

by:
thumky earned 0 total points
ID: 21867687
I rebuilt from scratch and now its okay.  I'll assign points to anyone who can help me learn something constructive from this...
( other than 'when you have a problem w/ Microsoft you need to continually reboot and rebuild until it works!' )
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question