cString = System.Text.Encoding.Default.GetString(Convert.FromBase64String(cEncoded))...to obtain the string. And, then, to save the string to a file:
' Try to open the file Using loFileStream As System.IO.FileStream = New FileStream(lcFile, FileMode.Create) loStreamWriter = New StreamWriter(loFileStream, cEncoding) loStreamWriter.Write(cString) loStreamWriter.Close() llSuccess = True Exit For End UsingBut, no matter what I try, this is always an invalid file. I have tried saving the string as Default, UTF8, UTF7, UTF32, Unicode, ASCII and BigEndianUnicode.