BloggingAbout.NET
Thoughts of developers

Don’t close the original DataStream in a Custom Adapter

I have written a custom adapter over two years ago that worked a charm back then. Recently I had to use it again in a little project. It worked, but not when an error occurred on transmission. In that case it failed with the following errors in the eventlog:

“The Messaging Engine encountered an error while suspending one or more messages”

and

“The Messaging Engine encountered an error while deleting one or more messages”

After attaching the Visual Studio debugger to the BizTalk Host process and setting breakpoints on all Exceptions, I saw it failed on a closed stream. As clean as I am, my adapter closed and disposed everything inclused the stream I got from GetOriginalDataStream. And that is not allowed. After I fixed that, everything worked great!


Posted Sep 24 2006, 01:07 PM by Carlo Poli
Filed under:
Copyright © 2003-2008 BloggingAbout.NET
Powered by Community Server (Commercial Edition), by Telligent Systems