HOWTO: Internet Transfer Control Using Username and PasswordLast reviewed: October 16, 1997Article ID: Q173264 |
The information in this article applies to:
SUMMARYWhen setting the Internet Transfer Control URL, Username, and Password properties programmatically, the order in which you do it is very important. If you don't set the URL property before the Username and Password properties, you will get the following error:
Run-time error '35754' Unable to connect to remote hostIMPORTANT: In the control shipped with Visual Basic 5.0 (not SP2) the Username is sent as Anonymous if the URL property is not set first (regardless of the UserName and Password properties). So when connecting to an FTP server, you would be accessing the URL with the Anonymous credentials, not with the credentials you intended (according Username and Password Inet properties). NOTE: The Internet Transfer Control included with Visual Studio 97 Service Pack 2 is unable to make an authenticated connection using the Username and Password properties. For more information, see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q173265 TITLE : BUG: Internet Transfer Control (SP2) Username and Password WorkaroundThis is sample code for setting the URL property before the Username and Password properties so you won't get the error described above:
Inet1.URL = "ftp://YourFTPServer" Inet1.UserName = "Username" Inet1.Password = "Password"Notice the URL property is set before the Username and Password properties. This information is also documented in the Visual Basic 5.0 Readme file.
MORE INFORMATION
Steps to Reproduce Behavior
REFERENCESVisual Basic 5.0 Readme.hlp file; search on topic: "Internet Transfer Control: Set URL Before Password and UserName" Keywords : PrgCtrlsStd vb5all Technology : kbInetDev Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |