tags:

views:

29

answers:

1

Hello Guys,

I have a webservice that will accept stream (Image). I was able to successfully save the image but part of it is I also need to get the form-data that is part of the Stream. Do you have any idea how to achieve this? Or any suggestion perhaps to achieve same functionality.

Best regards,

A: 

You could stream it as an object or structure.

struct WCFStream 
{
   Image myImage;
   String formString1;
   String formString2;
}

You should provide a DataContract in which you serialize a structure similar to the above and send it, then deserialize it on the target machine, check this example out.

http://msdn.microsoft.com/en-us/magazine/cc163569.aspx

kyndigs