Error, sometimes can't upload files

siu
07-11-2004, 09:31 PM
Hi, I am using a class name cFTP that I got from a site and when I send try to upload files, sometimes it does and sometimes it shows the following error:

Cast from String "The activities of authorized" to 'integer' is not valid

I don't know if any of you are familiar with this. The problem is that I can't afford to have this situation because can't tell users that sometimes the program will upload the file and sometimes it doesn't.

If somebody knows a simple way to just upload some files using visual basic .net application I would appreciate it to tell me. I emphasize application because my search for this always sends me to asp / asp.net code and really i don't want to upload files from a webpage, I want my visual basic application to upload the file.

The following code is what I have using the cFTP class:


Dim f As cFTP
f = New cFTP("ServerString", PortNumber)
With f
.IdVerify("UserNameString", "PassWordString")
.FtpPutFile(Application.StartupPath & "\pic1.jpg", "public_html/picture.jpg", FileLen(Application.StartupPath & "\pic1.jpg"))
.Close()
End With
f = Nothing

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum