I am stumped I am getting Outof Memory exception when converting a
large base64 sting to binary.

        Dim binaryData() As Byte = Convert.FromBase64String(FileInfo)
        Dim fs As New FileStream(filepath, FileMode.Create)
'overwrites
        fs.Write(binaryData, 0, binaryData.Length)
        fs.Close()


I think what needs to be done is to create a stream and just write
smaller chunks at a time to the binary file but when I do this, my
binary file is corrupted. I think I am getting burned by converting C#
examples to VB.net. The specific example I am looking at is located at
http://blogs.microsoft.co.il/blogs/kim/archive/2007/10/09/base64-encode-large-files-very-large-files.aspx
and it seems this should work but I am at my wits end..

Does anyone have a better example I can review that is in VB?

Thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to