473,387 Members | 1,693 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,387 software developers and data experts.

WebRequest and Form Authentication

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.logi...tErrNumber=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
Nov 16 '05 #1
2 2601
Tony wrote:
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.logi...tErrNumber=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,

--
Joerg Jooss
jo*********@gmx.net
Nov 16 '05 #2
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.

"Joerg Jooss" wrote:
Tony wrote:
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.logi...tErrNumber=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,

--
Joerg Jooss
jo*********@gmx.net

Nov 16 '05 #3

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

Similar topics

17
by: James Johnson | last post by:
Dear C#dex, I define a variable: HttpWebRequest webRequest and run the following request webRequest = WebRequest.Create(TARGET_URL) as HttpWebRequest; The webRequest object returns values...
5
by: Tony | last post by:
Please help, I've scoured the web but cannot find an answer to this! I want to use WebRequest to get the contents of a web page. The trouble is, the page require you to go to a login page (using...
2
by: TheBurgerMan | last post by:
Hi all. I need to attach NetworkCredentials to a WebRequest and display the resulting web page in an IFRAME (aspx). I have validated that I can get the page (using the NetworkCredentials), but...
2
by: Stephen Miller | last post by:
I have an ASPX report and I want to capture the rendered HTML and write to a file on the webserver. Several posts suggest using WebRequest to make a second call to the page, and screen-scrape the...
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...
0
by: IronYuppie | last post by:
Hi all-- I'm retrieving contents from my site using the retrieving images from the database method listed here: ...
2
by: davidcbrown | last post by:
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.