Hi
I have the following code:
Dim cred1 As New System.Net.NetworkCredential("myusername",
"mypassword", "mydomainname")
Dim cc As New System.Net.CredentialCache
cc.Add(New Uri("http://www.yahoo.com"), "Basic", cred1)
Dim wp As System.Net.WebProxy = New
System.Net.WebProxy("myproxy", 80)
wp.Credentials = cc
Dim wr As WebRequest = WebRequest.CreateDefault(New
Uri("http://www.yahoo.com"))
wr.Proxy = wp
Dim wrep As WebResponse = wr.GetResponse()
Dim st As MemoryStream = wrep.GetResponseStream()
Dim sr As StreamReader = New StreamReader(st)
Dim result As String = sr.ReadToEnd()
Response.Write(result)
Response.End()
End Sub
When I execute the above code I get the error "The remote server
returned an error: (407) Proxy Authentication Required"
Juan T. Llibre - 31 Oct 2005 17:44 GMT
See : http://support.microsoft.com/default.aspx?scid=kb;en-us;248020
Also, verify your syntax against this example :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fSystemNetWebRequestClassProxyTopic.asp
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
> Hi
>
[quoted text clipped - 22 lines]
> When I execute the above code I get the error "The remote server
> returned an error: (407) Proxy Authentication Required"