views:

15

answers:

0

Using the following as a guide I am attempting to implement a streaming file upload from a client to a server through a Web Service. The example provided below is streaming in the opposite direction from Web Service on a server to client.

I am using IIS 7 on Windows 2008 R2 and .Net Framework 3.5

How To: Chunk Serialized Data http://msdn.microsoft.com/en-us/library/ms172362%28VS.80%29.aspx

Its obvious to me when streaming from the Web Service to the client the ASP.Net response buffering needs to be turned off at the server side. But since I am doing the opposite direction its not the Response I need buffering turned off, its the incoming request.

On my client side I have implemented WriteXML which reads chunks of data into a buffer 4096 bytes at a time and on the server side Web Service Method I have implemented the ReadXML method to receive those chunks and write them to file.

This is working except it is not steaming each chunk written in WriteXML on the client side and is sending all the chunks at once when the WriteXML method is completed.

Is there something that needs to be set client side to make the WriteXML method stream these chunks to the WebService like there is on the server side for the Web Method?

The following doesn't seem to affect the incoming stream from client when set in the Web Method. // Turn off response buffering. System.Web.HttpContext.Current.Response.Buffer = false;