Automatic login via asp (vb) .net

  • Thread starter Thread starter Paul M.
  • Start date Start date
P

Paul M.

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.
 
Paul M. said:
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.

If this "System" is a web-based login form, it must be. It might be a
java-applet
or an axtive-x control, but somewhere on that page there bust be 2 textboxes
to input "user" and "pwd".

The "xxx.sh?login=xx..." form only works for forms that is "GET"'ed,
not "POST"'ed. So the fields might be there, but you must POST them
to the script.

If you can post the part of the HTML that defines the login-form, maybe
we can find something?
 
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
 
cheers, I'll try that tommorrow.

paul

Munsifali Rashid said:
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. said:
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.
 

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