This is a migrated thread and some comments may be shown as answers.

Invalid Viewstate during Load Testing Web Farm

4 Answers 301 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joe Sugden
Top achievements
Rank 1
Joe Sugden asked on 18 Sep 2013, 02:14 PM
Hello,

We have a load balanced web farm that we want to load test.
All web servers are set to use the same machine key in web.config. The load-balancer is configured for sticky session.

We have a Web Test that executes successfully. We used it to create a Load test. However the load test is causing the following server error:
System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
at System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


If I disable mac validation in config, it still does not work and message is:
System.Web.HttpException: The state information is invalid for this page and might be corrupted.
at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

4 Answers, 1 is accepted

Sort by
0
Joe Sugden
Top achievements
Rank 1
answered on 18 Sep 2013, 04:00 PM
I only found this old article with the same problem with of no help...http://www.telerik.com/community/forums/aspnet-ajax/async-upload/radasyncupload-in-web-farm.aspx
0
Cody
Telerik team
answered on 18 Sep 2013, 08:19 PM
Hello Joe,

Is sounds like the ASP.NET __VIEWSTATE hidden variable is giving you problems. Did you select this as a dynamic target? If not, please check all __VIEWSTATE's listed in the dynamic target. Without it being selected the load test will simply echo what the value was at the time of recording. If it the correct value changes at run time you will run into this problem.

If that doesn't help I'll need additional information:


Regards,
Cody
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Joe Sugden
Top achievements
Rank 1
answered on 20 Sep 2013, 07:44 PM
I re-recorded the test and started working with 1 user...
It did not give me an option to select the __VIEWSTATE  as a dynamic target, only query string parameters, see attached image.

However, for whatever reason it does not work now for more than one user - the dynamic query string parameters don't kick in and it is trying to request the same static URL every time...
0
Cody
Telerik team
answered on 25 Sep 2013, 04:47 PM
Hi Joe,

Unfortunately I can't diagnose what is causing the problem having only a screen shot of the dynamic targets. To further diagnose what and where the load test is going wrong I really need:

Regards,
Cody
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Joe Sugden
Top achievements
Rank 1
Answers by
Joe Sugden
Top achievements
Rank 1
Cody
Telerik team
Share this question
or