Save Variation: The state information is invalid for this page and might be corrupted

Vote:
 

My Commerce version: 5.2 (build: 628)

If i add a new meta field of type "Image File" to my catalog entry and save my Variation i get the following error:

The state information is invalid for this page and might be corrupted.

[FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. ]

   System.Convert.FromBase64_ComputeResultLength(Char* inputPtr, Int32 inputLength) +14390556
   System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) +90
   System.Convert.FromBase64String(String s) +56
   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose) +102
   System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose) +67
   System.Web.UI.HiddenFieldPageStatePersister.Load() +200

[ViewStateException: Invalid viewstate.
Client IP: ::1
Port: 62858
Referer: http://localhost:17001/Apps/Shell/Pages/ContentFrame.aspx?_a=Catalog&_v=Variation-Edit&catalogid=5&catalognodeid=&catalogentryid=5070&undefined
Path: /Apps/Shell/Pages/ContentFrame.aspx
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
ViewState: ,/wEPDwUKLTQwMTA2MDQ0NA9kFgQCAQ9kFgICFQ8VAR4vQXBwcy9TaGVsbC9QYWdlc...]

 

Adding the image, leaving it empty or recreating the field all results in this error. Does anyone encountered this error? All help welcome and appreciated..



#81994
Mar 03, 2014 12:12
Vote:
 

Hi,

This is a known bug of EPiServer Commerce R2 SP2, when you try to upload a file which has size larger than 640KB to a metafield, it will cause the error. 

Please note that store files in metafield(s) can cause serious performance issues, which we recommend to avoid it completely if possible. You should use the asset system provided by eCF, which is much more faster and scalable. 

In you case you still need to use metafield, one workaround is to change httpPostBufferSize in web.config to the value you want to support, the number is in bytes.

Regards.

/Q

#82004
Edited, Mar 03, 2014 17:12
Vote:
 

Not adding an image also results in the desribed error when saving the variation.

#82028
Edited, Mar 04, 2014 14:07
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.