I am attempting to load test a simple ASP.NET application, which GETS a default login page and then POSTS login information back to that page, but I'm getting an exception from .NET that it doesn't like the __VIEWSTATE (hidden variable that .NET uses to track state of form variables) data I'm posting. I'm pursuing a fix for this from the .NET side, but my guess is that a fairly simple change will get JMeter to handle __VIEWSTATE. Apparently, .NET does some verification that the page hasn't been tampered with and I'm guessing that that check is seeing some difference between what the initial GET request receives and what I'm extracting and posting back. I don't see any difference but it's a huge random string, so hard to tell.

I'm using JMeter 1.9.1 with JDK 1.4 on WinXP. Any insights welcome. TIA

TestPlan looks like this:

ThreadGroup (for now, 1 thread)
|--UserParameters (__CSVRead's login info)
|--HTTP Request Defaults
|--HTTP Request (GET default login aspx page)
|--Regex Extractor (extract the VIEWSTATE value: see below for details)
|--HTTP Request (POST login info UserParameters and VIEWSTATE extracted info: see below for details)
|--various listeners



The regex: reference name: viewstate regular expression: name="__VIEWSTATE" value="(.*)" template: $0$ match no: 1 default value: ERROR


the HTTP POST request:
Name: __VIEWSTATE value: ${viewstate_g1} encoded?: false (I also try 'true' which gives a different exception, see below)
include equals?: true



The server responds:


The viewstate is invalid for this page and might be corrupted.
Exception Details: System.Web.HttpException: The viewstate is invalid for this page and might be corrupted.
[HttpException (0x80004005): The viewstate is invalid for this page and might be corrupted.]
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +149
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +423




If I change the POST requests encoding to 'true' I get a different error--I think that the viewstate is already encoded and setting this true scrambles it, so I just provide this to be complete.

Index was outside the bounds of the array.
[IndexOutOfRangeException: Index was outside the bounds of the array.]
omcct.defaultForm.Button1_Click(Object sender, EventArgs e) in \\blah\default.aspx.vb:102
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277



FWIW, I have followed M$' advice and tried turning off some things on the server side (Page directives), to no avail:
EnableViewState="false"
EnableViewStateMAC="false"


###



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to