cancel
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 https://xxx.xxxxxx.com/paymentresponse.aspx) when user submit payment from authorize.net hosted payment page (https://secure.authorize.net/gateway/transact.dll), 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 authorize.net sandbox test account with the same silent post url and calling the test payment gateway (https://test.authorize.net/gateway/transact.dll), there will be no error event, the silent post url works well;

 

it seems to me that authorize.net 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

appfinityasia
Member
3 REPLIES 3

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.

 

RaynorC1emen7
Expert

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?

 

Thanks

I wonder if authorize.net 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()
{
	try
	{       //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.
		PageStatePersister.Load();
		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

http://lachlankeown.blogspot.com/2008/05/online-viewstate-viewer-decoder.html

And post the result here.