473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

WebRequest - Proxy Authentication Required

I started using .NET 2003 and my first application is to parse an HTML form.
But I am behind an ISA firewall and get "(407) Proxy Authentication
Required" with the following code. The proxy settings in webReq.Proxy
appear to be OK, even without setting them as below. IE works, but this
does not. Any ideas? (or where to ask?) -- David

Dim webReq As WebRequest = WebRequest.Create(txtUrl.Text)
webReq.Proxy = WebProxy.GetDefaultProxy
Dim webResp As WebResponse = webReq.GetResponse
Dim sr As New StreamReader(webResp.GetResponseStream, Encoding.ASCII)
Dim html As String = sr.ReadToEnd()
sr.Close()
Nov 20 '05 #1
2 6389
David,

You may want to set the Credentials property of your WebRequest object.

Telmo Sampaio
"davidcbrown" <dc******@removethisfrontiernet.net> wrote in message
news:Op**************@tk2msftngp13.phx.gbl...
I started using .NET 2003 and my first application is to parse an HTML form. But I am behind an ISA firewall and get "(407) Proxy Authentication
Required" with the following code. The proxy settings in webReq.Proxy
appear to be OK, even without setting them as below. IE works, but this
does not. Any ideas? (or where to ask?) -- David

Dim webReq As WebRequest = WebRequest.Create(txtUrl.Text)
webReq.Proxy = WebProxy.GetDefaultProxy
Dim webResp As WebResponse = webReq.GetResponse
Dim sr As New StreamReader(webResp.GetResponseStream, Encoding.ASCII)
Dim html As String = sr.ReadToEnd()
sr.Close()

Nov 20 '05 #2
Sorry, I should have mentioned that I had tried that too with no success.

David

"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:Om**************@TK2MSFTNGP09.phx.gbl...
David,

You may want to set the Credentials property of your WebRequest object.

Telmo Sampaio

"davidcbrown" <dc******@removethisfrontiernet.net> wrote in message
news:Op**************@tk2msftngp13.phx.gbl...
I started using .NET 2003 and my first application is to parse an HTML

form.
But I am behind an ISA firewall and get "(407) Proxy Authentication
Required" with the following code. The proxy settings in webReq.Proxy
appear to be OK, even without setting them as below. IE works, but this
does not. Any ideas? (or where to ask?) -- David

Dim webReq As WebRequest = WebRequest.Create(txtUrl.Text)
webReq.Proxy = WebProxy.GetDefaultProxy
Dim webResp As WebResponse = webReq.GetResponse
Dim sr As New StreamReader(webResp.GetResponseStream, Encoding.ASCII)
Dim html As String = sr.ReadToEnd()
sr.Close()


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark Ferguson | last post by:
I've been trying to get a simple pycurl script working with an authenticating proxy, here is the code (with changes to protect the guilty!): from pycurl import * import StringIO b =...
8
by: John K. | last post by:
Hi I was wondering if it's possible to use the WebRequest class to access a file on windows shared folder with authentication? If yes, what would the syntax be? I've tried to look this up in the...
4
by: Terry | last post by:
Hello, I am trying to get a response for an .aspx page in my current project (same virtual directory) by using WebRequest.GetResponse but I keep getting a exception with "500 Internal server...
3
by: Wild Wind | last post by:
Hello all, I apologise in advance for the long windedness of this post, but I feel that if I am going to get any solution to this problem, it is important that I present as much information...
6
by: Jensen Bredhal | last post by:
Hello, I need to send command to a web server from a method. I understand this should be possible using the WebClient or WebRequest class. how can this be done? below an example of my...
2
by: rcp | last post by:
Hi all, I've read all posts from all existing threads and none of them worked to solve my problem, although its exactly the same. I'll try to explain my case and see if a kind soul could help me...
4
by: Boni | last post by:
I want consuming a webserivce trough a proxy. I use this code. myService s = new myService (); System.Net.WebProxy proxyObject = new System.Net.WebProxy("http://proxyhost:8080"); s.Proxy =...
7
by: chandru1782 | last post by:
Dear friends, I am trying to use CPAN for installing some perl modules. i am using a ubuntu system, which has internet connection through lan and authenticated proxy. when trying to install...
5
by: =?Utf-8?B?TWFyaw==?= | last post by:
I'm researching what is the best way to create a generic WCF proxy wrapper that has the following requirements: 1. Remove the System.ServiceModel config section requirement for clients. We have...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.