Showing results for 
Search instead for 
Did you mean: 

silent post in SIM will cause error event "view state is invalid"

I have setup a silent post url in merchant account (the url looks like when user submit payment from hosted payment page (, the gateway do send the silent post back to the url specified in my merchant account, but there will be an error event occurs which says "Viewstate verification failed. Reason: Viewstate was invalid." (I already set the "EnableViewState" to false in paymentresponse.aspx);


when I setup my sandbox test account with the same silent post url and calling the test payment gateway (, there will be no error event, the silent post url works well;


it seems to me that test payment gateway and live payment gate function differently, even we set up the same silent post url; could anyone tell me why this happens?


Many Thanks.


Yang Liu


Maybe is this EnableViewStateMac="false" ?

Are you using web farm for load balancing?

Also, can you run the the page in web browser and look at the page source. Maybe it is still generating a viewstate.



I have setup both EnableViewState and EnableViewStateMac to "false", and we are not using web farm;


I also run the response page in web browser and look at the page source, there is no viewstate generated.


the weird thing is that if I setup the same silent post url in both of my merchant account and my sandbox test account, the sandbox test account (test gateway) will have no problem (the silent post url will response successfully); but my merchant account (live gateway with the same silent post url) will generate error event (invalid viewstate);


does anyone have this issue before?



I wonder if post viewstate from their production site to your silent post URL. I not using silent post, so I can't test it in production.


Since you said you don't use viewstate on your page.  If you feel adventurous, try overriding the load viewstate event on your silent post page.

protected override object LoadPageStateFromPersistenceMedium()
	{       //If you want to see what in the viewstate and controlstate save it in database or a file with a timestamp or some other key.
		string _viewStateString = PageStatePersister.ViewState.ToString();
		string _ControlState = PageStatePersister.ControlState.ToString();
	catch { }

	return null;

And if you save the data, use a viewstate decode to see what it in

And post the result here.