473,396 Members | 2,017 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,396 software developers and data experts.

Inserting Username and Password to web browser

Hi,
I made a form application with a WebBrowser that navigates to a
certain URL. This URL is asking for a username and html before I enter
it (a message box is shown and asks for a username and password). I
already know the username and pass, so how can I make the application
automatically insert them and go straightly to the URL I want?
Please help,
Ofir.
Oct 13 '08 #1
6 8555
On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.comwrote:
Hi,
I made a form application with a WebBrowser that navigates to a
certain URL. This URL is asking for a username and html before I enter
it (a message box is shown and asks for a username and password). I
already know the username and pass, so how can I make the application
automatically insert them and go straightly to the URL I want?
Please help,
Ofir.
And how do I activate a function in the page or "press" a button in
the page?
Oct 13 '08 #2
You clearly are just beginning and its understandable that you do not know
that no competent programmer will code authentication the way you are asking
about because it is not secure.

ASP.NET supports a Membership, Roles and Profile system that is used to do
exactly what you probably need but not the way you are asking to get it
done.

Go to http://www.asp.net/learn/security/ and study -- ALL -- of the video
tutorials.

"ofiras" <of****@gmail.comwrote in message
news:1f**********************************@p58g2000 hsb.googlegroups.com...
On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.comwrote:
Hi,
I made a form application with a WebBrowser that navigates to a
certain URL. This URL is asking for a username and html before I enter
it (a message box is shown and asks for a username and password). I
already know the username and pass, so how can I make the application
automatically insert them and go straightly to the URL I want?
Please help,
Ofir.
And how do I activate a function in the page or "press" a button in
the page?

Oct 13 '08 #3
On Oct 13, 5:37*am, ofiras <ofi...@gmail.comwrote:
On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.comwrote:
Hi,
I made a form application with a WebBrowser that navigates to a
certain URL. This URL is asking for a username and html before I enter
it (a message box is shown and asks for a username and password). I
already know the username and pass, so how can I make the application
automatically insert them and go straightly to the URL I want?
Please help,
Ofir.

And how do I activate a function in the page or "press" a button in
the page?
try the following to put a value into a textbox
HtmlElement tb = brow.Document.GetElementById("TextBox1");
tb.InnerText = "QWERTY";

try the following to click a button

HtmlElement Button1 = brow.Document.GetElementById("Button1");
Button1.InvokeMember("click");

Oct 13 '08 #4
On 13 אוקטובר, 20:16, Ralph <ralph...@gmail.comwrote:
On Oct 13, 5:37*am, ofiras <ofi...@gmail.comwrote:
On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.comwrote:
Hi,
I made a form application with a WebBrowser that navigates to a
certain URL. This URL is asking for a username and html before I enter
it (a message box is shown and asks for a username and password). I
already know the username and pass, so how can I make the application
automatically insert them and go straightly to the URL I want?
Please help,
Ofir.
And how do I activate a function in the page or "press" a button in
the page?

try the following to put a value into a textbox
HtmlElement tb = brow.Document.GetElementById("TextBox1");
* * * * * * tb.InnerText = "QWERTY";

try the following to click a button

HtmlElement Button1 = brow.Document.GetElementById("Button1");
Button1.InvokeMember("click");
Thanks.
Question - how do I know the id of the messagebox and the textboxes in
it?
It looks like that:
http://img527.imageshack.us/img527/4743/loginmk2.jpg
And about the security problem that Hillbilly stated - I use it for
my one only, and anyway everybody knows the username and pass
(everybody that has my kind of modem).
Oct 14 '08 #5
On 14 אוקטובר, 13:45, ofiras <ofi...@gmail.comwrote:
On 13 אוקטובר, 20:16, Ralph <ralph...@gmail.comwrote:
On Oct 13, 5:37*am, ofiras <ofi...@gmail.comwrote:
On 13 אוקטובר, 11:03, ofiras <ofi....@gmail.comwrote:
Hi,
I made a form application with a WebBrowser that navigates to a
certain URL. This URL is asking for a username and html before I enter
it (a message box is shown and asks for a username and password). I
already know the username and pass, so how can I make the application
automatically insert them and go straightly to the URL I want?
Please help,
Ofir.
And how do I activate a function in the page or "press" a button in
the page?
try the following to put a value into a textbox
HtmlElement tb = brow.Document.GetElementById("TextBox1");
* * * * * * tb.InnerText = "QWERTY";
try the following to click a button
HtmlElement Button1 = brow.Document.GetElementById("Button1");
Button1.InvokeMember("click");

Thanks.
Question - how do I know the id of the messagebox and the textboxes in
it?
It looks like that:http://img527.imageshack.us/img527/4743/loginmk2.jpg
*And about the security problem that Hillbilly stated - I use it for
my one only, and anyway everybody knows the username and pass
(everybody that has my kind of modem).
Bumping the subject...
Please help
Oct 15 '08 #6
If he want's to pre-authenticate to another site/application, you'll need to
either adjust the other site to accept a passed in token, for lookup, or he'll
need to actually simulate the user logging into the page in question, then
pass any cookies to the user before redirecting to the foreign site...

The latter is really bad form.. if it's for personal use, I'll often create a
bookmark, like the following...

javascript:document.forms[o].elemenst['u'].value='someuser';...forms[0].submit();

where I populate whatever values I want... if I have a bunch of users for
different classes in a test site, it's usually easier than the autologin
feature. but that's another point.

On 10/13/2008 8:24 AM, Hillbilly wrote:
You clearly are just beginning and its understandable that you do not
know that no competent programmer will code authentication the way you
are asking about because it is not secure.

ASP.NET supports a Membership, Roles and Profile system that is used to
do exactly what you probably need but not the way you are asking to get
it done.

Go to http://www.asp.net/learn/security/ and study -- ALL -- of the
video tutorials.

"ofiras" <of****@gmail.comwrote in message
news:1f**********************************@p58g2000 hsb.googlegroups.com...
On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.comwrote:
>Hi,
I made a form application with a WebBrowser that navigates to a
certain URL. This URL is asking for a username and html before I enter
it (a message box is shown and asks for a username and password). I
already know the username and pass, so how can I make the application
automatically insert them and go straightly to the URL I want?
Please help,
Ofir.

And how do I activate a function in the page or "press" a button in
the page?

--
Michael J. Ryan - tracker1(at)theroughnecks(dot)net - www.theroughnecks.net
icq: 4935386 - AIM/AOL: azTracker1 - Y!: azTracker1 - MSN/Win: (email)

.... If all else fails, immortality can always be assured by spectacular error.
Oct 16 '08 #7

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

Similar topics

9
by: deko | last post by:
I want to use htaccess for authentication on my php site since I only have a few users who need access to secure areas. So, I created a new directory off public_html (secretDocs) and in that...
4
by: Lobang Trader | last post by:
Hi all, I am trying to create a username and a password class. I would like to know what are the RECOMMENDED minimum and maximum length for both fields? These fields will be something like...
0
by: penglish1 | last post by:
Hi, I'm trying to get xmlrpc working with usernames and passwords and having some issues. This is on Linux (WBEL3.0R1). First of all with python 2.2.3 which comes with WBEL the following...
2
by: john brown | last post by:
There is a web page that I access frequently and would like to automate the authentication of the username and password. I would like to user a perl script but I'm not really sure about the steps....
8
by: Noel Volin | last post by:
Anyone who can help here is much appreciated. I am trying to programmatically log onto a website. I am using the code provided in VS for the AuthenticationManager Class example (...
1
by: thoducng | last post by:
I am writing some code to access share folder on a remote network. DirectoryInfo dicInfo = new DirectoryInfo("remoteNetwork\shareFolder"); if (dicInfo.Exists) { //application code...
0
by: Rod | last post by:
We've just released out second major ASP.NET application this week. It uses Crystal Reports for .NET. We use forms authentication with Active Directory, to authenticate the user against. We...
12
by: Cecil | last post by:
Does this make sense for a logon table: CREATE TABLE Logon ( ID INT NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(15) NOT NULL, password VARCHAR(15) NOT NULL ) GO CREATE UNIQUE INDEX...
5
by: livefreeordie | last post by:
Hi, I'm part of a 5-person team that develops websites for our company. I need to use the ftp_* functions to find some files on another file server. I need to authenticate to the file server...
0
by: =?Utf-8?B?TW9uaXF1ZQ==?= | last post by:
I just reinstalled IIS as I worked with wamp before and yet I didn't find out how to have a php and a asp server working the same time on a computer. (I had to uninstall the IIS to get wamp at...
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:
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

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.