with base64, every three bytes (24 bits) of data is converted to four bytes
of printable data (6 bit). when you convert base64 back, you read 4 bytes at
a time and convert back to 3 bytes. you get this error when you don't have a
mulitple of 4. most likely the data is bad, you can append 1 to 3 '='s
to get the correct length (these convert to nulls). you should figure out
why your base64 string are actually invalid.
-- bruce (sqlwork.com)
"Diffident" <Di*******@discussions.microsoft.com> wrote in message
news:AF**********************************@microsof t.com...
Hi Bruce,
Thanks for the reply. But how can I get rid of this problem?
Thanks!!!
"Bruce Barker" wrote:
base64 string have to be even in length to be valid.
-- bruce (sqlwork.com)
"Diffident" <Di*******@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com... > ErrorMessage:
> -------------
> Invalid length for a Base-64 string.
>
> ErrorSource:
> -------------
> mscorlib
>
> ErrorTargetSite:
> ----------------
> Byte[] FromBase64String(System.String)
>
> ErrorTrace:
> ----------------
> at System.Convert.FromBase64String(String s)
> at System.Web.UI.LosFormatter.Deserialize(String input)
> at System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
>
> = = = == = = = = = == = = == == == == ===== = = = = = = = = = == ==
> = =
> ==
>
> Hello All,
>
> Can anyone explain me about this error. I do not think that it is with
> my
> application code. I cannot debug this problem.....
>
> Thanks!!!
>
>
>