Jump to content


Validation of viewstate MAC failed.


  • Please log in to reply
7 replies to this topic

#1 Guest_Sean M. Severson_*

Guest_Sean M. Severson_*
  • Guests

Posted 10 February 2010 - 08:11 PM

I'm working on my first load testing scenario for an ASP.NET application and have created several profiles. I'm testing my profiles one-by-one and am ecountering the following error.

System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. ---> System.Web.UI.ViewStateException: Invalid viewstate.

There was a thread on this back in 2008, but I did not see a resolution at that time.

I am running a single user for a single profile. The profile loops for 5 minutes and lands on 4 different pages. I have attached the Scenario and the profile in question. I have tried entering enableViewStateValidation = "false" into the web.config files as recommended in some other threads, but this does not help.

We are not running a Web Farm. I do not receive these errors when I run the application manually. I am using the think times generated individually for each request via the record process.

I am using WAPT 6.0 Built on Sep 9, 2009.

Thanks for your help.

Sean M. Severson

Attached Files



#2 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 11 February 2010 - 12:09 PM

Could you give me a log file or send it to support@loadtestingtool.com?
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com

#3 Guest_Sean M. Severson_*

Guest_Sean M. Severson_*
  • Guests

Posted 11 February 2010 - 01:18 PM

Sergei,

Your question about the log file prompted me to look at this feature (which I had not reviewed before). I discovered that I was getting errors about not being authorized to view pages. I'll use the logs to try to resolve this issue. If I still need assistance, I will post another entry to this thread.

Thanks for your help.

Sean M. Severson

#4 Guest_Sean M. Severson_*

Guest_Sean M. Severson_*
  • Guests

Posted 11 February 2010 - 05:03 PM

Sergei,

I have attached a log file. Even after looking through the log file, I was unable to determine other steps to take. So, I am still receiving the following error from my asp.net application.

System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. ---> System.Web.UI.ViewStateException: Invalid viewstate.

Thanks for your help.

Sean M. Severson

Attached Files



#5 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 17 February 2010 - 10:05 AM

I think your profile has a wrong parametrization or some requests are missing.
I see following error message in the most of responses:
The application has experienced an error. Please contact your system administrator if this problem persists.
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com

#6 Guest_Sean M. Severson_*

Guest_Sean M. Severson_*
  • Guests

Posted 17 February 2010 - 02:40 PM

Sergei,

Yes, some of the paramters in my profiles were messed up. I have corrected this and all but one of my profiles are now running without error. The error I am receiving is in our code, but only occurs when I run the load test, not when I manually perform the same activities through our application. This may also be due to an incorrect paramter. I'm still working in this one.

Thanks,

Sean M. Severson

#7 Guest_Sean M. Severson_*

Guest_Sean M. Severson_*
  • Guests

Posted 17 February 2010 - 03:13 PM

Sergei,

One of the aspx pages I am testing creates a new record, generates a new id for that record, and displays the record on the form. I then add some information into the form and save the record. How does WAPT handle the generation of the id? It looks like it is attempting to use a variable in place of the actual value. Can I use the value that is generated by my code and actually placed in the control on my form?

Sean M. Severson

#8 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 18 February 2010 - 06:27 AM

You should find the id in a server reply, store it in a variable and then use the variable value in the form submit request.
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users