Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Invalid length for a Base-64 char array

Reply
Thread Tools

Invalid length for a Base-64 char array

 
 
Wayne Sepega
Guest
Posts: n/a
 
      02-19-2007
I'm receiving the above error from time to time with one of our web pages.
What would cause this?
Thanks
Wayne

The following is the stacktrace from the exception:

System.Web.HttpUnhandledException: Exception of type
'System.Web.HttpUnhandledException' was thrown. ---> System.FormatException:
Invalid length for a Base-64 char array. at
System.Convert.FromBase64CharArray(Char[] inArray, Int32 offset, Int32
length) at System.Web.HttpServerUtility.UrlTokenDecode(String input) at
System.Web.UI.Page.DecryptString(String s) at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack
trace --- at System.Web.UI.Page.HandleError(Exception e) at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) at
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) at
System.Web.UI.Page.ProcessRequest(HttpContext context) at
ASP.alerts_add_aspx.ProcessRequest(HttpContext context) at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)



 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      02-19-2007
Most likely your alerts_add_aspx page has data being posted that fails
validation (illegal characters, elements added to a dropdownlist after the
page was rendered, etc).

There are attributes to turn page validation and event validation off, but
they also
come with less security protection, which may or may not be an issue in your
environment.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"Wayne Sepega" wrote:

> I'm receiving the above error from time to time with one of our web pages.
> What would cause this?
> Thanks
> Wayne
>
> The following is the stacktrace from the exception:
>
> System.Web.HttpUnhandledException: Exception of type
> 'System.Web.HttpUnhandledException' was thrown. ---> System.FormatException:
> Invalid length for a Base-64 char array. at
> System.Convert.FromBase64CharArray(Char[] inArray, Int32 offset, Int32
> length) at System.Web.HttpServerUtility.UrlTokenDecode(String input) at
> System.Web.UI.Page.DecryptString(String s) at
> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
> Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack
> trace --- at System.Web.UI.Page.HandleError(Exception e) at
> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
> Boolean includeStagesAfterAsyncPoint) at
> System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
> Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest()
> at System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) at
> System.Web.UI.Page.ProcessRequest(HttpContext context) at
> ASP.alerts_add_aspx.ProcessRequest(HttpContext context) at
> System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
> at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
> completedSynchronously)
>
>
>
>

 
Reply With Quote
 
 
 
 
Wayne Sepega
Guest
Posts: n/a
 
      02-20-2007
The application has been in production for little over a year now. From what
I have been told these exceptions happen from time to time, only reason I
saw the one below was due to the fact that we just did a big deployment and
I had to monitor our systems after it.

I know about the attributes to turn off the page validation, I went to great
lengths to keep this on when writing the app, so at this point turning it
off isn't an option.

We do our own encryption and decryption of the query strings, but that code
isn't showing in the stack trace, and as such I'm a bit lost on what the
issue could be. I just forced the decryption to except by modifying the
query string and I get a different exception, as well as the stack trace
includes my method for decrypting the query string.

Any suggestions on what I can do to track this down?
Wayne


"Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Most likely your alerts_add_aspx page has data being posted that fails
> validation (illegal characters, elements added to a dropdownlist after the
> page was rendered, etc).
>
> There are attributes to turn page validation and event validation off, but
> they also
> come with less security protection, which may or may not be an issue in
> your
> environment.
> Peter
> --
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> Short urls & more: http://ittyurl.net
>
>
>
>
> "Wayne Sepega" wrote:
>
>> I'm receiving the above error from time to time with one of our web
>> pages.
>> What would cause this?
>> Thanks
>> Wayne
>>
>> The following is the stacktrace from the exception:
>>
>> System.Web.HttpUnhandledException: Exception of type
>> 'System.Web.HttpUnhandledException' was thrown. --->
>> System.FormatException:
>> Invalid length for a Base-64 char array. at
>> System.Convert.FromBase64CharArray(Char[] inArray, Int32 offset, Int32
>> length) at System.Web.HttpServerUtility.UrlTokenDecode(String input) at
>> System.Web.UI.Page.DecryptString(String s) at
>> System.Web.UI.Page.ProcessRequestMain(Boolean
>> includeStagesBeforeAsyncPoint,
>> Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack
>> trace --- at System.Web.UI.Page.HandleError(Exception e) at
>> System.Web.UI.Page.ProcessRequestMain(Boolean
>> includeStagesBeforeAsyncPoint,
>> Boolean includeStagesAfterAsyncPoint) at
>> System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
>> Boolean includeStagesAfterAsyncPoint) at
>> System.Web.UI.Page.ProcessRequest()
>> at System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) at
>> System.Web.UI.Page.ProcessRequest(HttpContext context) at
>> ASP.alerts_add_aspx.ProcessRequest(HttpContext context) at
>> System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
>> at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
>> completedSynchronously)
>>
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid length for a Base-64 char array =?Utf-8?B?ZGFuYw==?= ASP .Net 6 12-19-2008 12:14 PM
length of 2D Array >> char **myString= (char **) malloc (sizeof (char *)); davidb C++ 6 09-01-2006 05:57 PM
length of 2D Array >> char **myString= (char **) malloc (sizeof (char *)); davidb C++ 0 09-01-2006 03:22 PM
(const char *cp) and (char *p) are consistent type, (const char **cpp) and (char **pp) are not consistent lovecreatesbeauty C Programming 1 05-09-2006 08:01 AM
/usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98): unresolvable relocation against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostre silverburgh.meryl@gmail.com C++ 3 03-09-2006 12:14 AM



Advertisments