Proxy property of the HttpWebRequest
I've had problems getting through the http proxy where I work at the moment, but I got excellent help from Luke Hutteman, the author of the RSS Aggregator SharpReader. It all works fine now:
...
Dim webReq As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest) Dim newProxy As WebProxy = New WebProxy(host,port) If username.Length = 0 ThennewProxy.Credentials = CredentialCache.DefaultCredentials
Else Dim cred As New NetworkCredential(username, password) Dim credCache As New CredentialCachecredCache.Add(newProxy.Address,
"Basic", cred)credCache.Add(newProxy.Address,
"Digest", cred)newProxy.Credentials = credCache
End IfnewProxy.BypassProxyOnLocal =
TruewebReq.Proxy = newProxy
'some proxys need this toowebReq.Credentials = newProxy.Credentials
Dim objResponse As WebResponse = webReq.GetResponse...
Something like that :)