Invalid length for a Base-64 char array or string

Shannon Dunn asked on September 3, 2014 04:56

Throughout my site, regardless of the page templates and document types, we are getting either an Invalid Viewstate error or Invalid Length for a Base-64 char array or string. These are pages that have every web part with viewstate turned off except for a single web part on the root master that displays an unordered list at the top with common links and the Kentico login/logout control. Anyone else seen this in Kentico sites? I have seen this in two of my Kentico sites FREQUENTLY. As you can see from the stacktrace below its all ASP.NET code but it is on all our pages. I am running out of options and these errors are filling our error log. Users dont see the error but internally we do.

Message: Invalid length for a Base-64 char array or string. Stack Trace: at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength) at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) at System.Convert.FromBase64String(String s) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose) at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose) at System.Web.UI.HiddenFieldPageStatePersister.Load()

Recent Answers

Yehuda Lando answered on September 3, 2014 11:33

The Invalid length exception might be caused by a too long view state. Try turning on view state debug, or see how long it actually is.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.