HOWTO: Use WebBrowser HEADERS Param in Navigate MethodLast reviewed: August 22, 1997Article ID: Q172998 |
The information in this article applies to:
SUMMARYMicrosoft Internet Explorer 3.0 includes a custom ActiveX control called "WebBrowser." When you use WebBrowser in combination with Microsoft Visual Basic, you can design powerful custom solutions that include Internet Web browsing features. This article illustrates how to use the WebBrowser control HEADERS parameter in the Navigate method within Microsoft Visual Basic.
MORE INFORMATIONThe following example creates a mini-browser and uses the HEADERS parameter of the Navigate method. The HEADERS parameter has different options; this example uses the Authorization option. Adding this header allows you to gain access to a password protected URL without being asked for user name and password via a dialog box generated by the browser control. Note that code below applies only when Basic scheme is used. Please see HTTP Protocol specification (available at http://www.w3.org) to get more details on HTTP Authentication process. The format for Authorization header is as follow:
Authorization: Basic XXXXXXXWhere XXXXXX is Base64 encoded string: "UserName:UserPassword." Base64 is described in RFC1113 and some public domain utilities for Base64 decoding/encoding are available.
Step-by-Step Example
REFERENCESFor additional information, please see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q155969 TITLE : HOWTO: Distribute the WebBrowser Control ARTICLE-ID: Q162719 TITLE : HOWTO: Use the WebBrowser Control from Visual Basic 5.0 Keywords : vb432 VB4WIN vb5all Technology : kbInetDev Version : WINDOWS:4.0,5.0 Platform : WINDOWS Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |