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. Remoting File Transfer

Remoting File Transfer

Scheduled Pinned Locked Moved Visual Basic
helpsysadmin
1 Posts 1 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.
  • S Offline
    S Offline
    SHaroz
    wrote on last edited by
    #1

    I can send a file from the server to the client by having the client call a function which returns a FileStream. It works perfectly. I tried to send a file from the client to the server by having the client call a function with a filestream as a parameter. Unfortunately, the client gives me an error saying the the remoting proxy has no channel sink. :confused: The client's call:

    T.SendFileTest2(New FileStream("C:\in2.txt", FileMode.Open))

    The function in the hosted object:

    Public Function SendFileTest2(ByVal FSL1 As FileStream) As Boolean
        Dim Buffer(4096) As Byte
        Dim readed As Integer
        Do
            readed = FSL1.Read(Buffer, 0, 4096)
            Dim i As Integer
            Dim str As String
            For i = 0 To readed - 1
                str += Convert.ToChar(Buffer(i))
            Next
            MsgBox(str)
        Loop Until readed < 4096
        FSL1.Close()
        FSL1 = Nothing
    End Function
    

    I would greatly appreciate any help on this. Thanks, Steve

    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