Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

"The remote name could not be resolved" on WebRequests

Posted on 2008-06-25
4
5,382 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Help 27 57
Need syntax help building hyperlink 2 22
Visual Studio npm 1 9
.NET Enums [Flags] & Bitwise Design Question 6 21
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

840 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