First off, would not suggest to use ASCII encoding. As mentioned
here[
^]:
Quote:
ASCIIEncoding does not provide error detection. Any Unicode character greater than U+007F is encoded as the ASCII question mark ("?").
For security reasons, you should use UTF8Encoding, UnicodeEncoding, or UTF32Encoding and enable error detection.
Second, believe content of EncodedPicture or EncodedVideo is a encoded representation of the data. Try to convert that back to get the desired value. Use
FromBase64String
.
Try
File.WriteAllBytes("C:\\Users\\User\\Desktop\\SS\\" + filename, Convert.FromBase64String(dataToDownload));