Results 1 to 3 of 3

Thread: FTP/File sending

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2004
    Posts
    48

    Question FTP/File sending

    Dear Programmer,

    I am working on a project that works with Remote file seding. I am very confused because right now we are discussing a protocol/ methode that sends file from one workstation to an other (remote). Just like FTP, does any one has a suggestion?

    Gr.

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    You can use FTP if you like, there is a free control available that lets you do FTP from your program:


    http://www.chilkatsoft.com/ChilkatFtp.asp

  3. #3
    New Member
    Join Date
    Feb 2004
    Posts
    6
    One way to copy a file from a remote client to a server via HTTP is to use an XML web service. Simply write a function in your service like:

    Code:
    <WebMethod()> _
        Public Sub SaveFile(ByVal buffer() As Char, ByVal destServerPath As String)
    
            Dim sr As StreamWriter
    
            Try
                sr = File.CreateText(destServerPath)
            Catch ex As Exception
                Throw New Exception("An error occured during file creation on the server", ex)
                Exit Sub
            End Try
    
            Try
                sr.Write(buffer)
            Catch ex As Exception
                Throw New Exception("An error occured while writing to the file on the server", ex)
            End Try
    
            sr.Close()
    Then in your client app, pass the file stream along with the path to save it to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width