Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Invalid length for a Base-64 string. ??? Any ideas?

 
Thread Tools Search this Thread
Old 08-24-2005, 07:29 PM   #1
Default Invalid length for a Base-64 string. ??? Any ideas?


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!!!





=?Utf-8?B?RGlmZmlkZW50?=
  Reply With Quote
Old 08-24-2005, 09:31 PM   #2
Bruce Barker
 
Posts: n/a
Default Re: Invalid length for a Base-64 string. ??? Any ideas?

base64 string have to be even in length to be valid.

-- bruce (sqlwork.com)


"Diffident" <> wrote in message
news:6086DB4E-08C9-4AAF-B474-...
> 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!!!
>
>
>



  Reply With Quote
Old 08-24-2005, 10:28 PM   #3
=?Utf-8?B?RGlmZmlkZW50?=
 
Posts: n/a
Default Re: Invalid length for a Base-64 string. ??? Any ideas?

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" <> wrote in message
> news:6086DB4E-08C9-4AAF-B474-...
> > 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!!!
> >
> >
> >

>
>
>

  Reply With Quote
Old 08-25-2005, 01:01 AM   #4
Bruce Barker
 
Posts: n/a
Default Re: Invalid length for a Base-64 string. ??? Any ideas?

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" <> wrote in message
news:AFB1609D-DB86-4D55-AAFC-...
> 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" <> wrote in message
>> news:6086DB4E-08C9-4AAF-B474-...
>> > 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!!!
>> >
>> >
>> >

>>
>>
>>



  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump