logging onto another site on another server

  • Thread starter Thread starter MotorcycleIke
  • Start date Start date
M

MotorcycleIke

I tried using WebRequest, but I am unable to simply

redirect to an external aspx site and supply the userid and password and
press their login button.

Can anyone help?

Thanks, I've spent a couple of days on this and am now braindead.
 
I don't know the details of the form you're using, but if its a web form
(rendered in the browser by html) then you can probably just construct a
WebRequest using details supplied by the HTML code.

for example (hah i almost typed foreach!):

<form action="http://abc.com/foo.cgi">
<input type=text name=username>
<input type=password name=password>
<input type=submit>
</form>

you could construct a request with a URL of this to login:

http://abc.com/foo.cgi?username="+username+"&password="+password;

that's just to pass the login details in. you'll have to manage the
cookies and whatnot but that /should/ get you logged in. that would
work with any site i've used, but newer technologies have been created
that I've not had to interact with.

Best of luck!

jeremiah
 
Thanks a lot! What I tried with the webrequest made a local copy, it
didn't log me onto their site. I forgot to mention that we want to hide
the username and password from the user.
 
I got the webrequest to populate a webresponse and copy the website onto
our server. That doesn't do any good.
What I need to do is get the viewstate, add the login information and
postback to the external site.
I haven't had any luck.

I spent an hour at Barnes & Noble looking for a book that could help.
No luck.

This sounds so easy to do, but I am totally clueless.

Anyone have suggestions?
Thanks,
 

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

Back
Top