jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio Boso <ser...@bosoconsulting.it>
Subject Re: ASP.NET Login Problems
Date Mon, 14 Mar 2016 13:25:16 GMT
Hi the reg exp is correct.
You have to deal with URLencoding of data.
There is a flag to enforce encoding while postg the data.

Regards

Sergio Boso
Il 14/Mar/2016 13:54, "Frank Cazabon" <frank.cazabon@gmail.com> ha scritto:

> Hi,
>
> I am using jmeter for the first time.  I am trying to test an ASP.NET web
> site which has a log in process but the login is failing.  I have followed
> the YouTube videos I have found on how to read the viewstate, etc from the
> first response.
>
> I have set a Regular Expression Extractor like this:
>
> Ref Name: viewstate
> Regular Expression: <input type="hidden" name="__VIEWSTATE"
> id="__VIEWSTATE" value="(.+?)" />
> Template: $1$
>
> This apparently sets my viewstate variable to this:
> __VIEWSTATE=%2FwEPDwULLTE3MDEwNDYzMDVkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYCBSljdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJEFTUHhSb3VuZFBhbmVsMQUpY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRBU1B4Um91bmRQYW5lbDPxv02mMpEvM3h4JrOXma9O+ibYCrtMlDcXO9rZXOw5EQ%3D%3D
>
> The actual viewstate in the response data from the first request on the
> web site is this:
>
>
> value="/wEPDwULLTE3MDEwNDYzMDVkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYCBSljdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJEFTUHhSb3VuZFBhbmVsMQUpY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRBU1B4Um91bmRQYW5lbDPxv02mMpEvM3h4JrOXma9O+ibYCrtMlDcXO9rZXOw5EQ=="
>
> The Post data on my login request is this:
>
> POST data:
>
> __EVENTVALIDATION=%2FwEdAARsMasKlSFEobllKbv2sSBzNkBWguBA4UP71lsiJzRdRDHhGgN8+b0NXIwV57LBLpP2hHJlkpzwe0+KH%2FI%2Fh8UVyNcqsV%2FqpyHlFfUhxtyPR3wDhwUVJvkJEE6lRhD+bUQ%3D&__VIEWSTATE=%2FwEPDwULLTE3MDEwNDYzMDVkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYCBSljdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJEFTUHhSb3VuZFBhbmVsMQUpY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRBU1B4Um91bmRQYW5lbDPxv02mMpEvM3h4JrOXma9O+ibYCrtMlDcXO9rZXOw5EQ%3D%3D&__VIEWSTATEGENERATOR=C2E....
>
> The Response data for the login request has this error:
>
> The state information is invalid for this page and might be corrupted.
>
> [ViewStateException: Invalid viewstate.
>     Client IP: ***.***.***.***
>     Port: *****
>     Referer:
>     Path: /Login.aspx
>     User-Agent: Apache-HttpClient/4.2.6 (java 1.5)
>     ViewState:
> /wEPDwULLTE3MDEwNDYzMDVkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYCBSljdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJEFTUHhSb3VuZFBhbmVsMQUpY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRBU1B4Um91bmRQYW5lbDPxv02mMpEvM3h4JrOXma9O
> ibYCrtMlDcXO9rZXOw5EQ==]
>
> Can anyone spot what I am doing wrong?
>
>
> --
>
> Frank.
>
> Frank Cazabon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message