EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Does streams have to support Length? MessageBodyStream does not work.

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
Posted: 10/20/2014 07:08:56
by Martin Bring (Basic support level)
Joined: 10/20/2014
Posts: 2


I am evaluating your product and just now noticed that Zip and OpenPGP does not support MessageBodyStream (which i often used to return a Stream from a .Net WCF service). One get "Method not supported" when calling TElZipWriter.Add() and TElPGPWriter.Encrypt().

Is it so that your code uses stream.Length? I think that if the stream does not support seeking it does not support Length either, wich is the case regarding MessageBodyStream. Checking CanSeek=true will help to show an error message, but if you are dependent of Length it will not help my issue though.

Is there a possibility to use MessageBodyStream anyway or do I have to convert it to another type of Stream?

Regards Martin

int length = stream.Length
Posted: 10/20/2014 07:18:17
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

Is it so that your code uses stream.Length?

It uses both Length and Seek, so input stream must support both operations.
Posted: 10/27/2014 07:59:29
by Martin Bring (Basic support level)
Joined: 10/20/2014
Posts: 2

Thanks you for quick reply.

I solved it by copying the MessageBodyStream to a MemoryStream.

Martin Bring



Topic viewed 927 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!