The information in this article applies to:
SUMMARYThe Progress.exe sample from the ActiveX SDK, Internet Client SDK, and MSDN Online Web Workshop demonstrates how to use a URL moniker to asynchronously bind to data from a remote site on the Internet or an intranet. This Knowledge Base sample extends the original Progress by handling the case where authentication is required to access secured data. MORE INFORMATIONThe following file is available for download from the Microsoft Software Library: Progress.exeFor more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base: Q119591 How to Obtain Microsoft Support Files from Online Services For additional information, please see the following article in the Microsoft Knowledge Base: Q156904 FIX: Returning User Name and Password from IAuthenticate FailsHandling authentication requests from a URL moniker requires that the URL moniker host implement a bind status callback object which exposes both the IBindStatusCallback interface and the IAuthenticate interface. The sample uses multiple inheritance to expose these interfaces on the same object. The IAuthenticate interface consists of a single method, Authenticate. The sample implements IAuthenticate::Authenticate as follows:
When the URL moniker attempts to bind to the object specified in the call to CreateURLMoniker, it determines whether or not the object is secured. If the object is secured, the URL moniker queries the bind status callback object for IAuthenticate. The URL moniker queries for IAuthenticate through the IBindStatusCallback interface pointer registered with the bind context used in the binding operation. The implementation of Authenticate above retrieves the username and password from the dialog controls and returns them to the URL moniker if the username is non-NULL. Otherwise, the sample returns a valid window handle. The URL moniker uses this handle as the parent window handle in a call to the InternetErrorDlg WININET API. InternetErrorDlg presents the user with a dialog box requesting a user name and password required to access the secured data. To demonstrate how a URL moniker requests authentication information from its host, perform the following steps:
Additional query words: URLMON IBSC
Keywords : kbIE300 kbIE400 kbIE401 kbURLMon kbIE500 AXSDKUrlMon |
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |