Error-invalid length for a base-64 char array
Posted
by dmenaria
on Stack Overflow
See other posts from Stack Overflow
or by dmenaria
Published on 2010-06-01T10:08:25Z
Indexed on
2010/06/01
16:13 UTC
Read the original article
Hit count: 181
Hi , I have silverlight app that post some data to another web application ,the data to post is converted to base 64 using code
byte[] byteArray = Encoding.UTF8.GetBytes(sDataToPost);
sDataToPost = Convert.ToBase64String(byteArray);
Another webapplication get the data using the code
strText = System.Text.Encoding.ASCII.GetString(System.Convert.FromBase64String(postedData));
But it gives the exception invalid length for a base-64 char array
Thanks in Advance DNM
© Stack Overflow or respective owner