Question

I am continuously firing/uploading jpegs in the form of a byte array using C# Winform and invoking a WCF on my server.

Each byte array is of size 12381.

Am I right just uploading as byte array or should I be looking at streams for each item? I can see why we should use streaming for large files but for smaller ones? Is there anything tangible to get from converting to a stream before invoking a [web service]?

Thanks

Was it helpful?

Solution

If you're sure that file size would not be in MBs than I'd recommend to use MTOM. There're few conditions/restrictions when using Streaming like Contract should be designed to accept or return on Stream types, there're some security authentications which are not supported with Streaming etc.. For filesize specified in question is relatively small and Mtom encoding should be better choice to go with.

HTH, Amit Bhatia

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top