Remoting File Transfer
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
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