Groups | Blog | Home
all groups > vb.net > june 2007 >

vb.net : Access a secured website programmatically


Bill Nguyen
6/11/2007 5:08:18 PM
I have the URL, loginID, and password.
How do I login the website within my VB app?
Thanks

Bill

Tom Shelton
6/11/2007 5:24:21 PM
On Jun 11, 6:08 pm, "Bill Nguyen" <billn_nospam_ple...@jaco.com>
[quoted text, click to view]

Bill,

If your using the WebClient class, try setting the WebClient instances
credentials property...

Dim wc As New WebClient
wc.Credentials = New NetworkCredentials("UserName", "Password")

HTH,
Tom Shelton
Mr. Arnold
6/12/2007 2:43:31 AM

[quoted text, click to view]

These are C# examples, but every thing you can do in C# can be done with
VB.Net.

http://www.java2s.com/Tutorial/CSharp/0580__Network/UseWebClienttoreadwebsite.htm
Bill Nguyen
6/12/2007 9:31:20 AM
Thank you very much Tom and Arnold.
I will work on this .

Bill
[quoted text, click to view]

Bill Nguyen
6/12/2007 10:25:43 AM
Arnold;
Here's what I got!

I can login, however, I can't get the data I need.
The site is running ASP app, and it will display a page with the content I
would like to capture . I can "View Source" and see the data are embedded in
the HTML tags, but don't know how to get it. How can you read/download data
in the page?

Thanks a million!

Bill
--------------

(This is the bottom portion of the page)
Jaco Oil Co. Unleaded $2.3552 6/11/2007 0.03

Jaco Oil Co. Plus $2.4352 6/11/2007 0.03

Jaco Oil Co. Supreme $2.5152 6/11/2007 0.03

Jaco Oil Co. Diesel #2 $2.359 6/11/2007 0.02






[quoted text, click to view]


begin 666 clearblock.png
MB5!.1PT*&@H````-24A$4@````$````!" ,````HRS2[````!&=!34$``*_(
M-P6*Z0```!ET15AT4V]F='=A<F4`061O8F4@26UA9V5296%D>7')93P````&
M4$Q41?___P```%7"TWX````!=%).4P! YMAF````#$E$051XVF)@``@P```"
2``%/;5GA`````$E%3D2N0F""
`
end

begin 666 side_right.png
MB5!.1PT*&@H````-24A$4@```! ````#" (````5TQ@#````!&=!34$``*_(
M-P6*Z0```!ET15AT4V]F='=A<F4`061O8F4@26UA9V5296%D>7')93P````]
M241!5'C:8OS____)$\?-+2RG3NG5UM9C8V5E86%A9F8&DDQ,3$ &(QA\_/35
DU,QB^K0^)@82`<D:``(,`,;:#;E=0TW=`````$E%3D2N0F""
`
end
Mr. Arnold
6/12/2007 3:23:15 PM

[quoted text, click to view]
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=339&lngWId=10#zip

[quoted text, click to view]
AddThis Social Bookmark Button