Simple Inet Upload File
Posted on 2004-08-14
I am trying to upload a simple test file from my local hard disk to my server. I am using the following code:
Inet1.RemoteHost = "ftp://www.abc.com"
Inet1.UserName = "username"
Inet1.Password = "password"
Inet1.Protocol = icDefault ' I have also tried http and ftp
Inet1.Execute "www.abc.com", "PUT C:\junk\test.txt"
Private Sub Inet1_StateChanged(ByVal State As Integer)
Text1 = Text1 & State & vbCrLf
If State = icResponseCompleted Then
Text1 = Text1 & "Done"
I get the following string of States : 1,2,3,4,5,6,7,8,12,Done
However, the file does not appear on my server. In fact, even if I change my username/password to garbage, it sill produces the same sequence of States. It is somehow ignoring my UN/PW and not ever really uploading anything.
I am able to use a WS_FTP to upload the file with no problems so I know my UN/PW are correct.
Please tell me what I am doing wrong?