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

logging onto another site on another server

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.
Nov 17 '05 #1
3 1488
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

MotorcycleIke wrote:
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.

Nov 17 '05 #2
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.

jeremiah johnson wrote:
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

MotorcycleIke wrote:
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.

Nov 17 '05 #3
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,

MotorcycleIke wrote:
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.

Nov 17 '05 #4

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

Similar topics

5
by: Ravi Shankar | last post by:
Hi all, I have an enterprise application. I am using Apache Log4J for the logging purposes. WHen a request is received by the application, it goes throug servlets and many classes, and the...
1
by: Mark | last post by:
Hi, Anyone help..... I'm using Dev Avish's code to download various web pages onto my own pc. I play around with these pages and get them into a format I can meaningfully use...so far, so...
16
by: Einar Høst | last post by:
Hi, I'm getting into the Trace-functionality in .NET, using it to provide some much-needed logging across dlls in the project we're working on. However, being a newbie, I'm wondering if some...
15
by: Stephen Corey | last post by:
I need to write a program that launches Internet Explorer, then counts how many <ENTER> keys are pressed inside IE. I've seen a lot of references to the SetWindowsHookEx() API call, but all sources...
2
by: MotorcycleIke | last post by:
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. I got the webrequest to populate a...
0
by: Stu | last post by:
Hi, I need to post log in details from one web site to another to log the user in to one of two sites. The user will enter a username and password in to textboxes on site 'A', and depending on...
3
by: nicholas.petrella | last post by:
I am currently trying to use the python logging system as a core enterprise level logging solution for our development and production environments. The rotating file handler seems to be what I...
6
by: Larry Bates | last post by:
Every time I look at the logging module (up until now) I've given up and continue to use my home-grown logger that I've been using for years. I'm not giving up this time ;-) I find that I...
1
by: deshaipet | last post by:
As only primary database does archival logging - 1) How should I setup archival logging(LOGARCHMETH1 and LOGARCHMETH2 for Primary and Standby databases in HADR setup ? 2) Should I only use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.