New Posts New Posts RSS Feed: WCF Streaming Files
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

WCF Streaming Files

 Post Reply Post Reply
Author
Mike U View Drop Down
Newbie
Newbie
Avatar

Joined: 03-Jan-2008
Location: United States
Posts: 6
Post Options Post Options   Quote Mike U Quote  Post ReplyReply Direct Link To This Post Topic: WCF Streaming Files
    Posted: 18-Dec-2008 at 12:59pm
I'm trying to implement a file transfer mechanism client<->server via Wcf.  Our first attempt using chunking and InvokeServerMethod() was very slow.  After some research, it sounds like a more efficient approach is to use a transferMode="Streaming".
 
According to MS http://msdn.microsoft.com/en-us/library/ms789010.aspx  In order to make this work I have to have a [ServiceContract] with a method with one parameter of type Stream.  I can get this working in a standalone Wcf application, however I'm affraid I might be stuck trying to get this integrated into our Ideablade application.
 
Since the BOS is only listening for the WcfPersistenceServer, I won't be able to get my methods hosted by the BOS.  Is this correct?  If so is there anyway arround this other than having my own Service listening?
 
In short here is what I need.  The BOS to call my method (eg. SendFile(Stream fileStream)) not through InvokeServerMethod() which would not support a streaming protocol.
 
I know not an easy question.  Any Wcf experts want to share?
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 18-Dec-2008 at 2:29pm

You're correct that you won't be able to host your methods in the BOS itself.  Making the service contract and implementation extensible is an interesting idea, but probably not something we could pursue any time soon.

If calling your service methods from the BOS via a method called by InvokeServerMethod isn't feasible - I assume because you still have the issue of collecting the data for a non-stream return object - then you could make the call directly from your client application.   Especially since the data you're returning seems a bit out-of-band from your business objects and domain model, this seems like a cleaner design too.
 
Back to Top
Mike U View Drop Down
Newbie
Newbie
Avatar

Joined: 03-Jan-2008
Location: United States
Posts: 6
Post Options Post Options   Quote Mike U Quote  Post ReplyReply Direct Link To This Post Posted: 19-Dec-2008 at 4:12am
Making the call from the client application sort of misses the point.  I need to move files from client to server, so I'd need something on the server side to receive the file for later processing by a server side app. 
 
Thanks for the interest though.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down