At the input there is a string that needs to be converted to an object. Do so
byte[] file = System.Text.Encoding.UTF8.GetBytes(sign); System.Runtime.Serialization.Formatters.Binary.BinaryFormatter bf = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); MemoryStream ms = new MemoryStream(file); ms.Position = 0; object obj = bf.Deserialize(ms); I get an error
Invalid binary input format. Start of content (in bytes):
If I save to file
File(System.Text.Encoding.UTF8.GetBytes(sign), "application/text", name) then I get a file that is being tested without errors.
BinaryFormatter'ом, and then calmly deserialize. - Anton Komyshan