This is a migrated thread and some comments may be shown as answers.

Invalid length for a Base-64 char array

9 Answers 401 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Alessandro
Top achievements
Rank 1
Alessandro asked on 04 Mar 2013, 02:54 PM
Hi,


we're experiencing many times the error "Invalid length for a Base-64 char array". This error is written by our web site (not web application) by the AsyncPostBackError event handler of the RadScriptManager. We've got log information for this error 50/100 times a day.
We asked to the users if they see the error during navigation through pages, but only sometimes happens. In case that they see this mistake, there is a situation wherein the user clicks on a button (that is inside a form with many refresh panel, like a web email-send form, but whose fields require single validation on entry,e.g. for the Italian tax code which is calculated on the basis of the personal data) but the refresh panel starts the postback without the refresh image (also the IE loading with the refresh image inside the tab title isn't visible). So the user click multiple times on the  button and only after three or four times sees the correct refresh visualization or the render result on the browser page.

We have an error page, that is redirected by the AsyncPostbackError handler of the master page in case of error and there is a case, always on this page, wherein the user writes some data in the entries and uses option field to change the visualization, e.g. to pass to the societies data entry form, and we have log entry for errors during this navigation that comes from event handler that I mentioned and from Error page, but the user neither see the error in the web browser and the navigation never gone to the error page, but remains on the same page. This is a very strange situation, and we ask you how is possible...

Which is the cause of this error? 

We don't use any compression or other functionality on the viewstate or on ajax requests. We can observe this error only on few pages like this one I was talking about above.

The website run over a framework 4.0 pool. We use the 2012.3.1308.40 telerik reference of 2013 q1.

thanks in advance, I hope the post is complete and understandable.
we look forward for your feedback
best regards

Emanuele
M&GF Project 

9 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 07 Mar 2013, 08:29 AM
Hello Emanuele,

I suspect that the problem might be caused by in issue with RadCompression that we introduced in Q1 2013 release (2013.1.220). To verify whether this is the case, please disable RadCompression in your application. More information about RadCompression is available here.

Kind regards,
Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Alessandro
Top achievements
Rank 1
answered on 07 Mar 2013, 09:17 AM
Hello Martin,

we haven't any compression activated. Is it automatically activated?


thanks,
Emanuele


0
Martin
Telerik team
answered on 07 Mar 2013, 12:07 PM
Hello Emanuele,

To verify whether RadCompression is enabled, please look in the web.config file of your project for the following lines:

<httpmodules>
    ...
    <!-- Add this line exactly as is - the name value is important -->
    <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
</httpmodules>
<!-- If you're using IIS7, then add this, too-->
<system.webserver>
 <modules>
   ...
   <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
 </modules>
...    
</system.webserver>

In case you find it, please remove the highlighted lines above.

Regards,
Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Alessandro
Top achievements
Rank 1
answered on 08 Mar 2013, 10:47 AM

hello,

I verified that we haven't any reference to radcompression registered in web.config inside the two section that you described and there is no registration written in the config file. Any suggestions?


best regards
Emanuele
0
Martin
Telerik team
answered on 08 Mar 2013, 03:11 PM
Hello Emanuele,

Since RadCompression is not involved, I can only guess what may be the cause of the issue. I would suggest that you temporarily disable AJAX functionality and verify whether the problem continues to replicate. I would also need the exact exception message because it provides valuable information about the error itself. Another approach you can follow is to try to assemble a stripped runnable version of your website that replicates the issue. This way I would be able to debug it locally and provide more to the point resolution.

All the best,
Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Alessandro
Top achievements
Rank 1
answered on 08 Mar 2013, 05:06 PM

Hi,

here is the information we have about this error (it's written by the AsyncPostBackError event handler of the RadScriptManager) this is the ex.message :

Invalid length for a Base-64 char array
. in System.Convert.FromBase64String(String s) in System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) in System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) in System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) in System.Web.UI.HiddenFieldPageStatePersister.Load() 

we can't do a stripped runnable version for you because it's a very heavy web site too complex and varied to be thinned, and the source code is a property of a client.


thanks

Emanuele
0
Martin
Telerik team
answered on 11 Mar 2013, 06:26 AM
Hello Emanuele,

I have reviewed the stack trace, however I do not see any reference to Telerik code. The only thing that comes into my mind and might be related to this error is the viewstate compression feature of RadCompression. Could you please verify that viewstate compression is not enabled for your site (it is turned on by a .browser file. For more information go to the ViewState compression section here)?

All the best,
Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
ABC
Top achievements
Rank 1
answered on 01 Oct 2013, 10:44 AM
I am also getting the same error intermittently, again and again. My RadCompression is enabled. Shoud I disable it. My version is 2012.2.912.40
0
Antonio Stoilkov
Telerik team
answered on 04 Oct 2013, 05:41 AM
Hello,

You could try disabling the RadCompression in order to resolve your issue as suggested by Martin. However, without replicating the problem on our side and debugging it there is no way to say for sure what is causing the experienced exception.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Ajax
Asked by
Alessandro
Top achievements
Rank 1
Answers by
Martin
Telerik team
Alessandro
Top achievements
Rank 1
ABC
Top achievements
Rank 1
Antonio Stoilkov
Telerik team
Share this question
or