Chad Z. Hower aka Kudzu said:
WebRequest which is built in can do HTTPS.
Hi Chad. I am following and very interested in your project, but first
learning hard so hopefully soon I can help.
I am using Webrequest, and can get the HTTPS pages, but don't have any
experience with ASP, forms, post etc.
The page I am trying to login seems to have a simple form:
<h5>To login:</h5>
<FORM NAME="form1" TARGET="_top" ACTION="signon.asp" METHOD="post">
<INPUT TYPE="hidden" NAME="action" VALUE="admin">
<table width="59%" border="0">
<tr>
<td width="64%">Please enter your User ID:</td>
<td width="36%"><input name="Uid" id="Uid" maxLength=13>
</td>
</tr>
<tr>
<td>Please enter your password:</td>
<td><input name="Pswd" type="password" id="Pswd" maxLength=10>
</td>
</tr>
<tr>
<td> </td>
<td>
<input name="Submit" type="submit" id="Submit2" value="Login">
</td>
</tr>
</table>
</FORM>
I have been using many variations like:
Dim web As New System.Net.WebClient
web.Headers.Add("Content-Type", "application/x-www-form-
urlencoded")
Dim d As Byte() = System.Text.Encoding.ASCII.GetBytes
("uid=UserID&pswd=Password")
Dim res As Byte() = web.UploadData
("
https://free.info.com/login.html", "POST", d)
txtReturn.Text = System.Text.Encoding.ASCII.GetString(res)
web.Dispose()
This page is the login page. The page with the data I want to access
(files to download) is different. I tried using this page, (ie:
"
https://free.info.com/download.asp" but it redirects to a page that must
submit an "I agree with the Contract", then a page for login (if i follow
in IE).
This site is not very secure (I can download the files without any
authentication if I know the filename of the file), but the filenames
change every month and I would like to be able to get the html page using
authentication.
Thank you.
Masa