End of Stream encountered before parsing was completed?

后端 未结 6 641
遇见更好的自我
遇见更好的自我 2020-11-30 09:25

I am trying to deserialize a stream but I always get this error \"End of Stream encountered before parsing was completed\"?

Here is the code:

                


        
6条回答
  •  既然无缘
    2020-11-30 10:17

    Make sure the serialization completed, and that the serialization type matches the de-serialization type (i.e., make sure you're serializing with a BinaryFormatter if you're de-serializing with one). Also, make sure that the stream you serialized to really finished serializing, with a Stream.Flush() or something to that effect.

提交回复
热议问题