Home Page › Forums › BizTalk 2004 – BizTalk 2010 › FTP Adapter: stream in error state.
- This topic has 5 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
September 9, 2008 at 7:40 AM #20646
I am trying to retrieve a file using the FTP Adapter but I get the error: “A stream read or write operation failed because the stream is in an error state.”
I am using the a custom pipeline that simply logs a few details (audit trace) and returns the original message.
Thanks for your help
-
September 9, 2008 at 8:04 AM #20648
That error is most likely occurring in the pipeline component. To further diagnose the error, you can attach the Visual Studio debugger to the BizTalk process and step through the code. In visual studio set a breakpoint in the pipeline component in the Execute method. Then click Debug -> Attach to process, and select BTSNTSVC.exe. Now send a file through your process. It should stop on the breakpoint. If it does not stop, then try putting the following line in the pipeline component code:
System.Diagnostics.Debugger.Break();
Now, when the pipeline componet runs, you should see a message on the screen asking if you would like to attach the debugger. Click Yes.
-
January 27, 2009 at 7:09 AM #21577
I’m having the same problem. Did anybody find a solution to this problem?
-
January 27, 2009 at 12:29 PM #21579
Make sure the file being written to the FTP folder is completely written before it gets picked up by BizTalk as some FTP servers do not lock files and BizTalk starts picking them up before they’re finished being written: you can do this by changing the source system to write the file with a different extension and after writing renaming it to an extension that the BizTalk receive location is monitoring.
Also, if you have two BizTalk servers as hosts of the host instance of FTP adapter receive handler you should cluster the host so that only one of the host instances is running at once.
-
January 27, 2009 at 9:23 PM #21580
Good point. We do the same with our legacy systems (temporary file name and then rename). But there is similar sort of issue with FTP adapter when you use it outbound from BTS. Unfortunately, there is no flag in FTP adapter to use temporary file name while writing a file into remote FTP server.
Edit: After a bit of research and testing, I’ve found temporary folder property for FTP send port being a very efficient way to use temporary file naming when sending data to remote FTP server.
-
-
-
April 22, 2009 at 10:42 AM #22196
Did you ever figure this out I am getting the same error message?
Please let me know what you figured out
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.