PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average.

programmatically fill out an external webform

 
 
cgian31
Guest
Posts: n/a
 
      18th Oct 2005
I need to access an info page in an external website, normally
accessible after filling username and password in a form.

I would like to hide this complexity (!) from the user, allowing them
to access it through an internal web page (which I would design) maybe
with a simple hyperlink.

How could I use ASP.NET for designing a webpage that will
programmatically fill out two fields (user and password) in a simple
html form (through https)?

The application will fill the two fields and virtually click the
"login" button
on the web form.

I lack the overview how to practically do this.

 
Reply With Quote
 
 
 
 
Dirc Khan-Evans
Guest
Posts: n/a
 
      18th Oct 2005
cgian31 wrote:

> I need to access an info page in an external website, normally
> accessible after filling username and password in a form.
>
> I would like to hide this complexity (!) from the user, allowing them
> to access it through an internal web page (which I would design) maybe
> with a simple hyperlink.
>
> How could I use ASP.NET for designing a webpage that will
> programmatically fill out two fields (user and password) in a simple
> html form (through https)?
>
> The application will fill the two fields and virtually click the
> "login" button
> on the web form.
>
> I lack the overview how to practically do this.


You could use the System.Net.HttpWebRequest class to send the request
to your remote web page.

eg: HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create("https://www.remoteserver.com/");


So a search on HttpWebRequest on Google.. otherwise the following I
found is a good example:

http://weblogs.asp.net/guys/archive/...21/414118.aspx

Good Luck!

Dirc

--

 
Reply With Quote
 
 
 
 
S. Justin Gengo
Guest
Posts: n/a
 
      18th Oct 2005
cgian,

You don't need to fill out the page and "click" the button.

Just send the page that would normally receive the first one the data it
needs.

Use a WebRequest object and post to the receiving page.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"cgian31" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I need to access an info page in an external website, normally
> accessible after filling username and password in a form.
>
> I would like to hide this complexity (!) from the user, allowing them
> to access it through an internal web page (which I would design) maybe
> with a simple hyperlink.
>
> How could I use ASP.NET for designing a webpage that will
> programmatically fill out two fields (user and password) in a simple
> html form (through https)?
>
> The application will fill the two fields and virtually click the
> "login" button
> on the web form.
>
> I lack the overview how to practically do this.
>



 
Reply With Quote
 
vMike
Guest
Posts: n/a
 
      18th Oct 2005

"cgian31" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I need to access an info page in an external website, normally
> accessible after filling username and password in a form.
>
> I would like to hide this complexity (!) from the user, allowing them
> to access it through an internal web page (which I would design) maybe
> with a simple hyperlink.
>

You might also find this article/code useful.
http://west-wind.com/presentations/d...WebRequest.htm
mike


 
Reply With Quote
 
cgian31
Guest
Posts: n/a
 
      19th Oct 2005
Thank you all for your replies.

I cannot use the receiving page with the appopriate query strings
because my destination is an asp page/form having two fields:
Username/Password and a button: Login.
When the username/pwd fields are filled in and the Login button is
pressed, the application generates a 15 fugures code, always different,
which is then embedded into the url with this style:
https://url.com/default.asp?<15 figures code>

Since I don't know the code, I cannot access the second page directly,
but I need to fill in the first form in order for the application to
generate this code.

I see that the HttpWebRequest class is what I need, but how to match
the userid/pwd I pass with the respective fields in the asp
application? Can anybody give me another small hint?

 
Reply With Quote
 
cgian31
Guest
Posts: n/a
 
      19th Oct 2005
Also: how do I display the following page after the authentication, in
a browser?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Pass object from one webform to other webform Steve Caliendo Microsoft ASP .NET 0 17th Mar 2004 07:50 PM
aspx.vb webform redirect to aspx.cs webform in another project within the same solution...and back again? Hazzard Microsoft ASP .NET 7 12th Mar 2004 07:27 AM
no code in webform using vs.net, but in webform using notepad timmso Microsoft Dot NET Framework 1 20th Dec 2003 09:12 PM
no code in webform using vs.net, but in webform using notepad timmso Microsoft ASP .NET 1 12th Dec 2003 05:30 PM
Including WebForm Image Control in a Webform Table Control titof Microsoft ASP .NET 0 24th Jul 2003 02:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:54 AM.