Binary stream '0' does not contain a valid BinaryHeader. Occurs randomly

前端 未结 2 2033
时光取名叫无心
时光取名叫无心 2021-01-20 05:52

I\'m working on c# windows service that handles firebird database requests. My problem occurs at random moments (sometimes after 5 minutes, sometimes after just 4 calls to d

2条回答
  •  没有蜡笔的小新
    2021-01-20 06:44

    If you are using above deserializing methods & also call them while getting stream from clientstream OR other streams.... skip it. try to use directly those streams with formatter. Like Below :

    NetworkStream clientStream = client.GetStream();
    Object src = (Object)formatter.Deserialize(clientStream);
    

提交回复
热议问题