I'm not sure if this question is more SharePoint or more ASP.NET related.
In one of my lists I'm using .aspx page to create custom form for edit and create.
<XmlDocuments> <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url"> <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url"> <Edit>_layouts/UI/Pages/AddNewOrder.aspx</Edit> <New>_layouts/UI/Pages/AddNewOrder.aspx</New> <Display>_layouts/UI/Pages/AddNewOrder.aspx</Display> </FormUrls> </XmlDocument> </XmlDocuments>
In the page I have a form with mostly asp.net controls and save button.
The problem occurs (!)Only in Internet Explorer which should be the manin web browser for the app. When posting data on Save button click I'm getting an error. Page_Load and SaveData_Click methods are not hit in debugger.
Error from ULS:
System.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. 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()
Another error code:
Getting Error Message for Exception System.Web.HttpException (0x80004005): The state information is invalid for this page and might be corrupted. ---> System.Web.UI.ViewStateException: Invalid viewstate. ViewState: /wEPBSpWU0tleTo5NjQ4MDM5Yi0yYmViLTQ2NzQtODVhNS1lMDAxY2U5NWJmZjBkEnDmRxbrx80pe9MDNY7mdWPwIR64GPbhC6mlH34wZL4=,/wEPBSpWU0tleTo5NjQ4MDM5Yi0yYmViLTQ2NzQtODVhNS1lMDAxY2U5NWJmZjBkEnDmRxbrx80pe9MDNY7mdWPwIR64GPbhC6mlH34wZL4= --->
The problem dissapears when I try Document Mode IE8 in Internet Explorer but this can cause other problems.
I already tried:
- version IE10 and IE11
- removing all controls and code from the .aspx page (left only the Save button) and the problem still persisted!
- turning off ViewState - I guess i failed to do that (tried in IIS and for the page only) but this my also cause other issues?
This is my first post on sharePoint stackexchange. I really hope you guys can help because I'm really struggling with this one.