I'm ready to PayPal someone to figure this out for me:

-I want 2 files on the server, via a web svc call, to zip them up into
memory.
-then stream that file to a client-the calling client.
-that client then unzips the stream, and writes the 2 files.

The zip/unzip is routine, but the streaming of the file is not. I just
need to transfer the file, not start reading it as soon as it starts
to stream. When I use System.IO.Stream, I think that trying to read it
with .Length is failing because it doesn;t expect the whole file.

On the server side, I'm using:

    Public Function GetStuff() As System.IO.Stream Implements
IService1.GetWork
        Dim filePath = "c:\inetpub\wwwroot\gems\WcfService1\App_Data
\data.txt"

        Try
            Return File.OpenRead(filePath)
        Catch ex As Exception
            Console.WriteLine("GetWork Exception caught: " &
ex.ToString)
            Throw ex
        End Try

    End Function

But nothing I try on the client side will allow me to rebuild this
file. To write a Byte() I need size (length), and I can't read length
(throws exception) on the client side.

Either I need to wait for the stream to end, or a new way to catch
this stream at the client. Perhaps this is the wrong method/approach
altogether?

Seriously. Contact me if you'd like to make a little scratch helping
me! :)

TIA!!!

pat
:)

Reply via email to