Red Gate forums :: View topic - Viewstate problems under load
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Load
ANTS Load forum

Viewstate problems under load

Search in ANTS Load forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
code



Joined: 28 Jun 2006
Posts: 8

PostPosted: Fri Jul 28, 2006 9:36 am    Post subject: Viewstate problems under load Reply with quote

Hi,

I have been testing our .Net web app for several weeks now and the only continual error that I receive during a test run is to do with ViewState.

I had some initial problems setting up the test, as the site I am testing consists of a series of stepped pages (a card application) and if data is not passed correctly after each step, then the app will redirect you to the previous page. These were resolved so I know the test run works as I can see finished card applications being written to the database.

The problem arises when the test has been running for a while. We are currently at 150 virtual clients and we receive the following exception about 100 times an hour:

Code:
System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.InvalidCastException: Specified cast is not valid.
   at System.Web.UI.Page.LoadPageViewState()
   at System.Web.UI.Page.ProcessRequestMain()
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain()
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-----------------------------------------------------------


I set enableViewStateMac to false in the web.config as this exception was originally manifesting itself as a corrupt viewstate that was deemed invalid.

The error is generated by any of the stepped pages, it is not just tied into a single page, which confuses me slightly.

I was wondering if the error is due to a slow down in the site? When ANTS load is running through a test script, does it wait and wait on a request until timeout, and then continue to the next request in the script if the previous one fails? I so then I guess this would break the application process as the next step would always redirect to the previous, or the beginning depending on what had happened.

I am just trying to get my head round why we are seeing so many of these errors so any pointers would be greatly appreciated.

Many thanks,
Tim
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6646

PostPosted: Mon Jul 31, 2006 5:15 pm    Post subject: Reply with quote

Hi Tim,

It could be any of these things. I can't even begin to try to help based on this information because 9/10 times it's either something specific to the application or it's the ASPX pages appearing out-of-order in the test script. Please send an email to support@red-gate.com and we'll see what we can do for you.
Back to top
View user's profile Send private message
code



Joined: 28 Jun 2006
Posts: 8

PostPosted: Mon Jul 31, 2006 5:39 pm    Post subject: Reply with quote

Sorry, posted this on the wrong thread! ..

Hi Brian,

I have emailed support with all the test scripts and ANTS Load solution.

The site we are testing uses Forms Authentication and the error seems to be triggered during login/logout. When ANTS Load creates all the clients, will they generate authentication cookies specific to themselves or since everything is running from the same domain, will they share the same one? If a client reaches the end of the test script and logs out, will this cause all other clients who are running through the stepped process to error as they are no longer authenticated?

I know it is near impossible to suggest a solution without seeing everything involved so will keep looking.

As I say, support email sent earlier today.

Thanks
Tim
Back to top
View user's profile Send private message
code



Joined: 28 Jun 2006
Posts: 8

PostPosted: Mon Jul 31, 2006 9:25 pm    Post subject: Reply with quote

Hi Brian,

I was doing a bit more research tonight into the cause of our problem and it seems that at a random point during an iteration of a virtual client's Run method, a request comes back from the web client that has no viewstate value. This empty view state is then being passed to the next request, which generates our error. Our web app does not generate a 500 server error, just a 302 redirect back to the previous request.

The script continues erroring until the end of the Run method is reached. Once it is back at the beginning, everything starts again and it makes it through.

I have a simplified script at work that demonstrates this. I will email it to support in the morning. We are running at 150 virtual clients at the moment.

Thanks in advance.

Tim
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group