By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,233 Members | 1,383 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,233 IT Pros & Developers. It's quick & easy.

Automatic login via asp (vb) .net

P: n/a
Hi,
we have 2 www systems one which we wrote ourselves the other is a parent
company one over which we have no control. The 2nd system involves the user
having to enter a username & password in a login screen. Is there any way of
calling the 2nd systems login page and having the username & password be
inserted automatically? This auto passing in of information might also be
applied to optins selection so instead of manually clicking on several
buttons to get to where we want to go we just send a string with the options
included.

I have checked and there seems to be no facility for page parameters in the
2nd system so "xxx.sh?login=uname?pwd=password" isnt going to work.

Thanks in advance
Paul M.

Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
It *might* be possible using frames. Create a frameset with one frame and
load the login page into it. When the page is loaded, the frameset can
populate the form with username and password. Your frameset would something
like the following, assuming the form in the main page is called "frm" and
the username and password elements are called "txtUsername" and
"txtPassword".

<html>
<head>
<title>Frames</title>
<script language="javascript">
function populate()
{
var p = parent.frames["body"];
p.frm.elements["txtUsername"].value = "username";
p.frm.elements["txtPassword"].value = "password";
}
</script>
</head>

<frameset>
<frame name="body" src="loginpage.aspx" onload="populate()">
</frameset>

</html>

I've tested this code locally, and it works. However, I'm not sure it would
work if the frameset and login page are in different domains, as this would
be a security risk.

Hope this helps,

Mun


"Paul M." <pa**@nospam.fsnet.co.uk> wrote in message
news:br**********@newsg3.svr.pol.co.uk...
Hi,
we have 2 www systems one which we wrote ourselves the other is a parent company one over which we have no control. The 2nd system involves the user having to enter a username & password in a login screen. Is there any way of calling the 2nd systems login page and having the username & password be
inserted automatically? This auto passing in of information might also be
applied to optins selection so instead of manually clicking on several
buttons to get to where we want to go we just send a string with the options included.

I have checked and there seems to be no facility for page parameters in the 2nd system so "xxx.sh?login=uname?pwd=password" isnt going to work.

Thanks in advance
Paul M.

Jul 20 '05 #2

P: n/a
cheers, I'll try that tommorrow.

paul

"Munsifali Rashid" <mun@**RemoveToReply**vefuk.com> wrote in message
news:#P*************@TK2MSFTNGP11.phx.gbl...
It *might* be possible using frames. Create a frameset with one frame and
load the login page into it. When the page is loaded, the frameset can
populate the form with username and password. Your frameset would something like the following, assuming the form in the main page is called "frm" and
the username and password elements are called "txtUsername" and
"txtPassword".

<html>
<head>
<title>Frames</title>
<script language="javascript">
function populate()
{
var p = parent.frames["body"];
p.frm.elements["txtUsername"].value = "username";
p.frm.elements["txtPassword"].value = "password";
}
</script>
</head>

<frameset>
<frame name="body" src="loginpage.aspx" onload="populate()">
</frameset>

</html>

I've tested this code locally, and it works. However, I'm not sure it would work if the frameset and login page are in different domains, as this would be a security risk.

Hope this helps,

Mun


"Paul M." <pa**@nospam.fsnet.co.uk> wrote in message
news:br**********@newsg3.svr.pol.co.uk...
Hi,
we have 2 www systems one which we wrote ourselves the other is a parent
company one over which we have no control. The 2nd system involves the

user
having to enter a username & password in a login screen. Is there any way of
calling the 2nd systems login page and having the username & password be
inserted automatically? This auto passing in of information might also

be applied to optins selection so instead of manually clicking on several
buttons to get to where we want to go we just send a string with the

options
included.

I have checked and there seems to be no facility for page parameters in

the
2nd system so "xxx.sh?login=uname?pwd=password" isnt going to work.

Thanks in advance
Paul M.


Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.