Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Uploading a file.

Uploading a file.

Scheduled Pinned Locked Moved Visual Basic
comhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bso_Cool
    wrote on last edited by
    #1

    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!

    C H 2 Replies Last reply
    0
    • B Bso_Cool

      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!

      C Offline
      C Offline
      Carmine_XX
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • B Bso_Cool

        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!

        H Offline
        H Offline
        haggenx
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups