Advertisement

05.15.2008 at 06:10PM PDT, ID: 23407176
[x]
Attachment Details

Basic authentication using System.Net.WebClient

Asked by DColin in Microsoft Visual Basic.Net

Hi Experts,

I am reading the HTML of a web page using the attached code. This works fine but when I try to connected via a proxy server the server asks for my username and password using basic authentication. How do I send this login info. using the attached code. Thanks.Start Free Trial
1:
2:
3:
4:
5:
6:
Dim MyWebClient As New System.Net.WebClient()
Dim MyStreamReader As System.IO.Stream
Dim MyStream As System.IO.StreamReader
 
MyStreamReader = MyWebClient.OpenRead("http://www.Domain.com/")
MyStream = New System.IO.StreamReader(MyStreamReader)
[+][-]05.15.2008 at 06:24PM PDT, ID: 21579171

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 06:27PM PDT, ID: 21579185

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 06:35PM PDT, ID: 21579225

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 07:42PM PDT, ID: 21579633

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Sign Up Now!
Solution Provided By: theplonk
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628