himanshu jain
himanshu jain

Reputation: 89

Page gives an error about state information is invalid and can be corrupted

I am working with jmeter and after recording script when i am running that script then i am getting an error on some of the pages:

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

   [FormatException: Invalid length for a Base-64 char array.]
   System.Convert.FromBase64String(String s) +0
   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +77
   System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String     serializedState) +4
   System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
   System.Web.UI.HiddenFieldPageStatePersister.Load() +113

Why i am getting this error?

Page on which i am getting error by using jmeter is working perfect when i am opening this manually.

Upvotes: 1

Views: 1276

Answers (3)

Zubair M Hamdani
Zubair M Hamdani

Reputation: 1733

The solution for this is to use correlations, since the state information will be generated dynamically.

Please refer to below links for implementation:

Hope this will help

Upvotes: 1

Morgan Soren
Morgan Soren

Reputation: 593

I know this question is two years old, but I had the exact same issue, including the fact that only some of the threads had the error. I fixed it by just checking the "Use multipart/form-data for POST" option in the request that was getting the error.

Upvotes: 0

Aliaksandr Belik
Aliaksandr Belik

Reputation: 12873

You have to encode (Base64) your (anti-forgery) token(s) before posting to server.

...BTW: why not to try first search for answer if not with Google than across this resource or in Jmeter mailing archive at least, before asking?
Be sure, you'll find a lot of useful and interesting things!

Upvotes: 0

Related Questions