D
dzc55g
Problem: Attempting to return https web page via a proxy server not working in .NE
Platform: Windows 2000 SP4, Visual Studio .NET 2003, .NET Framework 1.
The following code returns
An unhandled exception of type 'System.Net.WebException' occurred in system.dl
Additional information: The underlying connection was closed: Unable to connect to the remote server
Code
HttpWebRequest HttpWReq = (HttpWebRequest)WebRequest.Create("https://webaddress.com")
WebProxy wp = new WebProxy("proxyaddress", 443);
wp.Credentials = new NetworkCredential("username","password")
HttpWReq.Proxy = wp
// Turn off connection keep-alives
HttpWReq.KeepAlive = false
HttpWebResponse HttpWResp = (HttpWebResponse)HttpWReq.GetResponse()
The code above seems to work fine on the following configuration
Windows XP, .NET Framework 1.
Windows 2000 SP3, .NET Framework 1.
However it does not work on
Windows XP, .NET Framework 1.
If I change the code to request a standard http page (e.g. http://google.co.uk) and change the port number to 80 the code works fine
Is there some version or security issue I am not aware of
Is this a known issue with 1.1 of the .NET Framework
Is there an alternative method in .NET
Platform: Windows 2000 SP4, Visual Studio .NET 2003, .NET Framework 1.
The following code returns
An unhandled exception of type 'System.Net.WebException' occurred in system.dl
Additional information: The underlying connection was closed: Unable to connect to the remote server
Code
HttpWebRequest HttpWReq = (HttpWebRequest)WebRequest.Create("https://webaddress.com")
WebProxy wp = new WebProxy("proxyaddress", 443);
wp.Credentials = new NetworkCredential("username","password")
HttpWReq.Proxy = wp
// Turn off connection keep-alives
HttpWReq.KeepAlive = false
HttpWebResponse HttpWResp = (HttpWebResponse)HttpWReq.GetResponse()
The code above seems to work fine on the following configuration
Windows XP, .NET Framework 1.
Windows 2000 SP3, .NET Framework 1.
However it does not work on
Windows XP, .NET Framework 1.
If I change the code to request a standard http page (e.g. http://google.co.uk) and change the port number to 80 the code works fine
Is there some version or security issue I am not aware of
Is this a known issue with 1.1 of the .NET Framework
Is there an alternative method in .NET