Solved

TWebBrowser authentication

Posted on 2004-04-13
8
985 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
Comment Utility
u can call the url like this

http://username:password@Your_urlAddress
0
 

Expert Comment

by:lnishimura
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Expert Comment

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

Expert Comment

by:lnishimura
Comment Utility
wont you close this?
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQed with points refunded (50)

modulo
Community Support Moderator
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now