Uploading a file.
-
I am designing a program for my father and he wants to be able to access a file from anywhere through the internet. He has an ftp space available on AOL, and I have got it to be able to download that file but I am unable to upload a file to it. I have code for it and it goes through the process and I never get an error saying that something went wrong, I even have it when it is finished I get a message box telling me it is done, and I get the message. Here is my code for the upload. Dim c As WebClient = New WebClient Dim FileName As String = Path & "\Limo Bookings\LimoBookings.run" Dim URL As String = "http://members.aol.com/XXXXXXX/" Dim responseArray As Byte() Try responseArray = c.UploadFile("http://members.aol.com/XXXXXXXX", "POST",FileName) c.Dispose() MsgBox("Upload Completed!") Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Error") End Try I appreciate any suggestion you have! And I Thank You in advanced!
-
I am designing a program for my father and he wants to be able to access a file from anywhere through the internet. He has an ftp space available on AOL, and I have got it to be able to download that file but I am unable to upload a file to it. I have code for it and it goes through the process and I never get an error saying that something went wrong, I even have it when it is finished I get a message box telling me it is done, and I get the message. Here is my code for the upload. Dim c As WebClient = New WebClient Dim FileName As String = Path & "\Limo Bookings\LimoBookings.run" Dim URL As String = "http://members.aol.com/XXXXXXX/" Dim responseArray As Byte() Try responseArray = c.UploadFile("http://members.aol.com/XXXXXXXX", "POST",FileName) c.Dispose() MsgBox("Upload Completed!") Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Error") End Try I appreciate any suggestion you have! And I Thank You in advanced!
I think that AOL doesn't support HTTP uploads. However you may use the FTP Upload, .Net framework provides a class for this. Bye,
Webmaster of: www.thetotalsite.it My web blog: blog.thetotalsite.it
-
I am designing a program for my father and he wants to be able to access a file from anywhere through the internet. He has an ftp space available on AOL, and I have got it to be able to download that file but I am unable to upload a file to it. I have code for it and it goes through the process and I never get an error saying that something went wrong, I even have it when it is finished I get a message box telling me it is done, and I get the message. Here is my code for the upload. Dim c As WebClient = New WebClient Dim FileName As String = Path & "\Limo Bookings\LimoBookings.run" Dim URL As String = "http://members.aol.com/XXXXXXX/" Dim responseArray As Byte() Try responseArray = c.UploadFile("http://members.aol.com/XXXXXXXX", "POST",FileName) c.Dispose() MsgBox("Upload Completed!") Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Error") End Try I appreciate any suggestion you have! And I Thank You in advanced!
you can use ftp access from ms-dos in a hidden process, you system must create a bat file with the ftp commands to upload these file, example ftp -A -i -s:ftp_file_instructions.txt ftp_address where -A anonymous access, sorry, i don't know how access with permisses -i no confirmation to each operation (yes or no to upload/download files) -s param to describe the text file with instructions, this text file contain each ftp command in the current session.
Manuel say: Greetings from Mexico, Cuando salga el sol, no estare aqui... --------------------------------------- Web: http://www.otakuzone-fanzine.com Forum: http://www.otakuzone-fanzine.com/foro