Hi
I was testing out the MSDN example and I noted that
any proxy settings I choose for web request has no effect.
Is this a known problem? I tried this
on the Ipaq 6500 phone series.
Allan
Sub Main()
Dim myWebRequest As HttpWebRequest =
CType(WebRequest.Create("http://www.microsoft.com"), HttpWebRequest)
Dim myProxy As New WebProxy
' Obtain the 'Proxy' of the Default browser.
myProxy = CType(myWebRequest.Proxy, WebProxy)
dim proxyAddress As String
proxyAddress = ""
proxyAddress = "http://no.such.proxy:9090"
If proxyAddress.Length = 0 Then
myWebRequest.Proxy = myProxy
Else
Dim username As String = "Rubbish"
Dim password As String = "Rubbish"
' Create a new Uri object.
Dim newUri As New Uri(proxyAddress)
' Associate the newUri object to 'myProxy' object so that new myProxy
settings can be set.
myProxy.Address = newUri
' Create a NetworkCredential object and associate it with the Proxy property
of request object.
myProxy.Credentials = New NetworkCredential(username, password)
myProxy.BypassProxyOnLocal = False
myWebRequest.Proxy = myProxy
End If
Dim myWebResponse As HttpWebResponse = CType(myWebRequest.GetResponse(),
HttpWebResponse)
End Sub
End Module