Proxy authentication error: Please Help

G

Greg Vereschagin

I cannot get the following code to work when trying to download web
pages through a proxy server:

[1] Dim wrq as Net.WebRequest
[2] Dim wrp as Net.WebResponse
[3] Dim proxyObject as WebProxy

[4] proxyObject = new WebProxy("abc-dc", 8080)
[5] proxyObject.BypassProxyOnLocal = True
[6] GlobalProxySelection.Select = proxyObject

[7] wrq = System.Net.WebRequest.Create(url)
[8] wrp = wrq.GetResponse()

At this point I get a System.Net.WebException = 407 which is a proxy
authentication error.

This code works fine at home (without lines [3] through [6]) where
there is no proxy server to deal with. But at work, I can't get past
the 407 error.

We do not have a full time system admin and the fellow that supports
us is not familiar with VB.net or anything resembling the above code.
I think the problem could be in the name of proxy server "abc-dc".
I've tried some variants but no luck. If the name of the proxy server
doesn't look right, where should look to find it's name. The system
admin believes it is "abc-dc".

Any help would be greatly appreciated.

Thanks,
Greg
 
G

Guest

Greg

Not sure if it’s related but this may help. We have a firewall in place and I had problems connecting to web services. I think the problem was the firewall but I’m not 100% sure

I added the following code, maybe you could try something similar

Dim proxyObject As New System.Net.WebProxy("http://999.999.999.9999:8080", True
ws.Proxy = proxyObjec
ws.Proxy.Credentials = New System.Net.NetworkCredential("user", "password", "domain"

Post back to let me & everyone else know how you get on
Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top