Invalid ViewState half way through load test

codecode Posts: 11
edited July 31, 2006 12:38PM in ANTS Load

I have been running a recorded test over an application we have developed and I am experiencing a strange viewstate problem.

The application is like a wizard consisting of 6 steps, all of which post form data. I modified the test to generate a unique email address for the application in order to make sure the virtual clients could complete the application. I then inserted the new email address string into the recorded test under the EmailAddress post field. It is at this point (after 4 successfuly requests to the site) that I get the viewstate error:
System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException: Invalid_Viewstate
	Client IP:
	Port: 61715
	User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
	Path: /authorisedofficial/confirmation.aspx. ---> System.Web.HttpException: Authentication of viewstate failed.  1) If this is a cluster, edit <machineKey> configuration so all servers use the same validationKey and validation algorithm.  AutoGenerate cannot be used in a cluster.  2) Viewstate can only be posted back to the same page.  3) The viewstate for this page might be corrupted. ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at System.Web.Configuration.MachineKey.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length)
   at System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
   at System.Web.UI.LosFormatter.Deserialize(String input)
   --- End of inner exception stack trace ---
   at System.Web.UI.LosFormatter.Deserialize(String input)
   at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
   at System.Web.UI.Page.LoadPageViewState()
   at System.Web.UI.Page.ProcessRequestMain()
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain()
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I don't know whether I am getting this because I have changed the email address post field.

I have read about other problems with ViewState but don't know if they apply to me.

Any assistance would be great.



  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Tim,

    We're dealing with this request via email. Thanks for sending it in!
  • Hi Brian,

    I have emailed support with all the test scripts and ANTS Load solution.

    The site we are testing uses Forms Authentication and the error seems to be triggered during login/logout. When ANTS Load creates all the clients, will they generate authentication cookies specific to themselves or since everything is running from the same domain, will they share the same one? If a client reaches the end of the test script and logs out, will this cause all other clients who are running through the stepped process to error as they are no longer authenticated?

    I know it is near impossible to suggest a solution without seeing everything involved so will keep looking.

    As I say, support email sent earlier today.

Sign In or Register to comment.