3 posts / 0 new
Last post
Receipt Page Invalid Viewstate

I'm trying to setup a hosted payment page that will AUTO-POST receipt data back to my own page. I'm using .net/aspx to create the page that receives the receipt information. Every time the auto-post happens back to my page I'm getting invalid Viewstate errors and can't find any way around them.

I've posted my errors below. How can I get .Net to not error out on the Viewstate data you are passing back?

The state information is invalid for this page and might be corrupted.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The state information is invalid for this page and might be corrupted.

Source Error:

[No relevant source lines]

Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\payeezyaspx\ec33891c\689dbce9\App_Web_yrl1w0yz.1.cs Line: 0

Stack Trace:

[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_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength) +733
System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) +152
System.Convert.FromBase64String(String s) +49
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose) +88
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose) +61
System.Web.UI.HiddenFieldPageStatePersister.Load() +182

[ViewStateException: Invalid viewstate.
Client IP: ::1
Port: 63027
Path: /PayEezyASPX/Post2Here.aspx
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
ViewState: wJoV6B%2B1ILvjaDMpjjuOwaoeJ5eTWNjNaz5rE6%2Fu%2FG4uFlsLDDSndPrtJD4FvvHFvu0yTSJovWnRdLf8Y3OTM%2Bl4qyCvaa0oD%2FxOhnkMcnTQJAaNklZ%2Fyw%2F6ChB%2F%2F4CX]

[HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +153
System.Web.UI.HiddenFieldPageStatePersister.Load() +330
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +374
System.Web.UI.Page.LoadAllState() +55
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +9547
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +356
System.Web.UI.Page.ProcessRequest() +76
System.Web.UI.Page.ProcessRequest(HttpContext context) +70
ASP.post2here_aspx.ProcessRequest(HttpContext context) in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\payeezyaspx\ec33891c\689dbce9\App_Web_yrl1w0yz.1.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +508
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92

Re: Receipt Page Invalid Viewstate

Joe - I also suggest that you reach out to the Payeezy implementations team at payeezy.gateway.support@firstdata.com.

Re: Receipt Page Invalid Viewstate

It looks like the invalid viewstate was actually being passed in from my originating page. Guess it just went along for the ride and came back to me. I've switched to using an MVC approach and things are working now.