WebRequest and Form Authentication

G

Guest

Hi all, I need some help please using WebRequest with a page that requires
you to log in through a different page.

I have a roster that is located at our internal address of
http://wfmmel01/WebETC/schedule.view.asp?. If you type this address in
directly, you are taken to a login page where you enter your username and
password. This address is
http://wfmmel01/WebETC/employee.login.asp?intErrNumber=501. The HTML for the
form looks like this:

<form name="LOG01" action="/WebETC/employee.login.asp?" method="POST"
onSubmit="return validateLOG01(this)">
<input type="hidden" name="Validate" ="1">
<input type="text" name="username" class="formfield" maxlength="9" value="">
<input type="password" name="password" class="formfield"
onFocus="this.select()" size="21" maxlength="21">

Once you click the login button, it takes you to the roster.

Using WebRequest, how can I go straight to the roster and supply the
username and password? I don't know much about cookies or encoding. I just
want a simple little solution that works.

Can anybody help me please?

Thanks

Tony
 
J

Joerg Jooss

Tony said:
Hi all, I need some help please using WebRequest with a page that
requires you to log in through a different page.

I have a roster that is located at our internal address of
http://wfmmel01/WebETC/schedule.view.asp?. If you type this address in
directly, you are taken to a login page where you enter your username
and password. This address is
http://wfmmel01/WebETC/employee.login.asp?intErrNumber=501. The HTML
for the form looks like this:

<form name="LOG01" action="/WebETC/employee.login.asp?" method="POST"
onSubmit="return validateLOG01(this)">
<input type="hidden" name="Validate" ="1">
<input type="text" name="username" class="formfield" maxlength="9"
value=""> <input type="password" name="password" class="formfield"
onFocus="this.select()" size="21" maxlength="21">

Once you click the login button, it takes you to the roster.

Using WebRequest, how can I go straight to the roster and supply the
username and password? I don't know much about cookies or encoding. I
just want a simple little solution that works.
Can anybody help me please?

Well, I tried to help you before, but if you don't try it or tell use where
you're stuck...

Cheers,
 
G

Guest

Hi Joerg

You're right. I suck at this. I'm going back to C# for Dummies. Web
programming is just way too complex and I can't find a source anywhere, be it
web or a book, that actually explains it step by step. Considering I (and I
assume lots of other people) don't understand GET, POST, encoding,
cookies...the only code snippets I can find are totally incomprehensible to
me. Maybe I'll just switch to VB and join all the other people who like to
call themselves programmers but really aren't.
 

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