Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error when using Inet Object

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Error Type:
Inet (0x800A8BAA)
Unable to connect to remote host
/ftp/inet.asp, line 25

I'm trying to connect to to an ftp but everytime I'm getting this error.
Any help appriciated. This is the code I'm using

dim objInet
Set objInet = CreateObject("InetCtls.Inet.1")

with objInet
.requestTimeout = 900
.URL = "ftp:// .Username ="temp"
.Password = "temp"

end with

objInet.execute ,"DIR -n > c:\temp\test.txt"

I've tried several times with different methods but still no results.

Thanks
 
Have u tried to use RemotePort?
Usualy on an ftp server is 21

dim objInet
Set objInet = CreateObject("InetCtls.Inet.1")
with objInet
.requestTimeout = 900
.RemotePort =21
.URL = "ftp:// .Username ="temp"
.Password = "temp"
end with

Hope this helps u..
 
First of all Thanks for your interest..

Sorry but I did say that I'm trying to do this from an asp file.

Like this is not misleading!!!

Any help appriciated
 
If u are in asp page u have to use
Server.CreateObject("InetCtls.Inet.1")
instead of CreateObject("InetCtls.Inet.1")


 
I've tried it and it's not working either..
I'm getting desperate

Any other suggestions..!!

Do you know how I can run a batch file file.vbs or execute a command as if I'm typing it in Command Prompt..

Because the command works in command prompt but I need to be able to run it through my asp file or vbs or bat files.

Thanks for your help..

 
I just wrote an .exe in Visual Basic that pulled files from an ftp site. As far as I know, you cannot use the Inet object in vbs. It has to be used in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top