Solved

TWebBrowser authentication

Posted on 2004-04-13
8
996 Views
Last Modified: 2012-06-21
Hi All,
 i am usign TWebBrowser to embed a browser in my form. From the TWebBrowser i call Navigate2() method to navigate to a url. Before the URL opens, a dialog is displayed to get the userid and password from the user.
 is there any way i can pass the information from the browser to the server without interrupting the user with the message box..
Appreciate the help.
Thanks,
Preetham.
0
Comment
Question by:kingpreetham
  • 4
8 Comments
 

Expert Comment

by:lnishimura
ID: 10815822
u can call the url like this

http://username:password@Your_urlAddress
0
 

Expert Comment

by:lnishimura
ID: 10815875
Here is a code
Put 2 edit's (User,Pass) and 1 button

----------------Sample---------------------
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, OleCtrls, SHDocVw_TLB;

type
  TForm1 = class(TForm)
    WebBrowser_V11: TWebBrowser_V1;
    Button1: TButton;
    user: TEdit;
    pass: TEdit;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
WebBrowser_V11.Navigate('http://' + user.text +':' + pass.text + '@192.168.0.254');
end;

end.





0
 

Author Comment

by:kingpreetham
ID: 10817810
I did pass the uid:pwd in the url and it worked...
How can i pass it as a part of the authentication header...
does it make a difference as compared to the first method..
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Expert Comment

by:lnishimura
ID: 10818065
I dont know...
But i think its not different than the first one
0
 

Expert Comment

by:lnishimura
ID: 10830270
wont you close this?
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13284888
PAQed with points refunded (50)

modulo
Community Support Moderator
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question