The Convert.ToBase64String encodes an array of (potentially) binary data
into an ASCII text compatble format so you can transmit binary data inside a
text file. I don't think that's what you. It seems like you just want to
write out the result of the serialization. Try this instead:
ms.Position = 0
ErrorReportingTextBox.Text &= vbCrLf & New StreamReader( ms ).ReadToEnd()
You will have to strip the Soap related markup if you serialize with the
SoapFormatter. Take a look at [0] for some more background information.
--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor
"Scott Meddows" <sc******************@tsged-removeme.com> wrote in message
news:ej**************@tk2msftngp13.phx.gbl...
I'm trying to serialize an object in VB.NET. I have all my objects
denoted with the <Seralizable()> Attribute. This is the code I am using...
Dim sf As SoapFormatter = New SoapFormatter
Dim ms As IO.MemoryStream = New IO.MemoryStream
sf.Serialize(ms, currentIssue)
ErrorReportingTextBox.Text &= vbCrLf &
Convert.ToString(Convert.ToBase64String(ms.ToArray ).ToString)
I get a list of a whole bunch of strange letters. So, I know I'm doing
this wrong, but I just want a simple serialization. I'd prefer to not have any
SOAP envelopes and such in the data (This is the only sample I could find)
Thanks in Advance
Scott