Please tell where i can have problem in my code?
I serialize the data into a list of objects, then send it to the tcp server for further manipulations This is how serialization works:
var objList = new List<object>
{
path,
attachmentContext.LogItemInfo.Attachment
};
byte[] toServer;
BinaryFormatter bf = new BinaryFormatter();
using (MemoryStream ms = new MemoryStream())
{
bf.Serialize(ms, objList);
toServer = ms.ToArray();
}
_client.SendAsync(toServer);
So some transmissions are serialized successfully, then somewhere on the random it fails
