[Weird problem] The XM file transfered by WCF, some sections in it were always repeated

Source: Internet
Author: User

Some sections in XML are always repeated, I have Ed these file by WCF.

I thought it's caused by buffersize of WCF or flush method of stream. (I don't what meaning of flush method is)

It took me about an half day to find cause of this probelm. And now, I find it's because I close stream in another thread.

Why close stream in another stream?

I intended to visit property of stream in another thread, but system throw exption somtimes because the stream was closed. So I closed stream after visited property of stream.

The resolution is if Canread is true then visit property in another stream and close stream in current thread. That's right.

 

[Weird problem] The XM file transfered by WCF, some sections in it were always repeated

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.