G
Guest
Hello--I just upgraded to Visual Studio .NET 2005 and suddenly, all my .NET
1.1 applications that accessed Web sites have broken. For example, this code:
WebClient wc = new WebClient();
wc.DownloadFile("http://www.microsoft.com/", "MSFT.htm");
.... throws a WebException on the second line. The WebException doesn't
specify a problem, but it has an InnerException of type
NullReferenceException with the following stack trace:
at System.Net.WebRequest.get_PrefixList()
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Net.WebClient.GetWebRequest(Uri address)
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
The same thing happens if I go one level lower for the WebRequest /
WebResponse approach. As soon as I call WebRequest.Create() I get a
NullReferenceException with a stack trace that ends exactly the same way:
at System.Net.WebRequest.get_PrefixList()
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
Does anyone have any idea what could be causing this? The URI and local
filename are valid, there is no proxy server involved, Internet access on
this machine is working just fine, and I'm logged on as an Administrator
(yeah, I know I shouldn't be, but ...).
Many thanks.
1.1 applications that accessed Web sites have broken. For example, this code:
WebClient wc = new WebClient();
wc.DownloadFile("http://www.microsoft.com/", "MSFT.htm");
.... throws a WebException on the second line. The WebException doesn't
specify a problem, but it has an InnerException of type
NullReferenceException with the following stack trace:
at System.Net.WebRequest.get_PrefixList()
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Net.WebClient.GetWebRequest(Uri address)
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
The same thing happens if I go one level lower for the WebRequest /
WebResponse approach. As soon as I call WebRequest.Create() I get a
NullReferenceException with a stack trace that ends exactly the same way:
at System.Net.WebRequest.get_PrefixList()
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
Does anyone have any idea what could be causing this? The URI and local
filename are valid, there is no proxy server involved, Internet access on
this machine is working just fine, and I'm logged on as an Administrator
(yeah, I know I shouldn't be, but ...).
Many thanks.