Dim client As HttpWebRequest = CType(HttpWebRequest.Create(url), HttpWebRequest)
Dim wproxy As IWebProxy = WebRequest.GetSystemWebProxy
If (wproxy IsNot Nothing) Then
Dim myProxy As New WebProxy()
Dim newUri As New Uri(url)
myProxy.Address = newUri
myProxy.Credentials = New NetworkCredential("un", "pwd", "dom")
client.Proxy = wproxy
myProxy.Credentials = New NetworkCredential("un", "pwd", "dom")
Else
Console.WriteLine("Proxy is null; no proxy will be used")
End If
when running in the proxy environment i am get 407 authentication error... any suggestion. i haven't messed with .app config either. Do i have to make some changes to .app config file.
my config looks like this
<configuration>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for My.Application.Log -->