Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Error with BizTalk Http Adapter and Custom Pipeline Component › Re: Error with BizTalk Http Adapter and Custom Pipeline Component
Ok. I now recall having this issue in an earlier project. Use the stream.Can… -methods to see what you can do with it, if you cant do what you want, wrap it in another stream. This method we used to be able to read a an incomming stream from whatever (as far as we needed) it came.
/// <summary>
/// This method ensures that the stream is seekable so that it can be written to archive.
/// </summary>
/// <param name=”stream”>The stream to ensure is seekable.</param>
public static Stream EnsureSeekableStream(Stream stream)
{
if (!stream.CanSeek)
{
stream = new Microsoft.BizTalk.Streaming.ReadOnlySeekableStream(stream);
}
return stream;
}
//Niklas