Invalid viewstate

Brian DonahueBrian Donahue Posts: 6,590 New member
edited December 17, 2004 1:23PM in ANTS Load

Most commonly this happens because your web server sends a redirect, for examlpe, after logging in to a website. After putting your details in login.aspx, for instance, you're sent to welcome.aspx.

Since ANTS Load is non-deterministic with its' scripting, you need to manually change the script so that it intercepts any possible 302 redirect situations and goes to the next page. You can do this using the Location property of the HttpResponse.
WebClient.HttpRequest.AddPostData("user", "Brian")
WebClient.HttpRequest.AddPostData("password", "noneya")
'Login logs us in and sends us to another page


  • Brian DonahueBrian Donahue Posts: 6,590 New member

    That looks like it should work. I set up a similar test where page 2 inherits page 1 and page 2 gets the value of a public string stored on page 1. According to the server logs, the browser client only gets page 2 and no redirection is taken place.

    Are you making these requests using SSL (https://)? If so, it's a known problem that the current version of ANTS Load is not storing cookies and this may be the cuase of the problem.

    If you're using SSL, please let us know and we will send a software patch.
This discussion has been closed.