469,613 Members | 1,301 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

Automatic login via asp (vb) .net

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
2 8337
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
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.

Similar topics

3 posts views Thread by Tim Wade | last post: by
1 post views Thread by Piotr Kurpiel | last post: by
1 post views Thread by Jim | last post: by
4 posts views Thread by Paul M. | last post: by
7 posts views Thread by Ben R. | last post: by
3 posts views Thread by Peter Ivarsson | last post: by
10 posts views Thread by Anil Gupte | last post: by
3 posts views Thread by mikey.mor | last post: by
10 posts views Thread by Victor | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.