Web Load Testing Tool Causing Exceptions

Posted on 2006-03-30
Last Modified: 2011-10-03

I'm trying to load test my application.  I've tried using MS ACT and Red Gate's Ants Load tools, but using either one causes my app to generate alot of exceptions. I'm recording a script and running it with 5 simultaneous connections.  The exceptions only seem to be occuring in a couple of pages and I'm not sure why since this does not happen in normal operation(I know - stress testing isn't 'normal operation'). This may seem silly, but is it simply because my app uses forms authentication and I really need separate scripts for each virtual user?  If this is the case, why isn't it effecting all pages?

I'm trying to figure out if the load tools have exposed a serious issue in the application or if some scenerios just can't be included in the testing.  I know I'm not giving much detailed info here, but I just want to get some direction from anyone with experience using stress testing tools.
Question by:LloydMc
    LVL 21

    Expert Comment

    what kind of exceptions are you getting? can you give me more information on it.


    Author Comment


    Some of the exceptions are invalid object references which point to session vars, but many errors related to the LosFormatter class occur as well.  The LosFormatter exceptions would seem to point to some issue with viewstate.  The page which throws the LosFormatter exceptions contains user controls which render hyper links with encrypted query strings.  The encrypted query strings are generated by server side script blocks within the html.
    LVL 12

    Accepted Solution

    Are you making sure that your encrypted strings are html safe? You can use Server.HtmlEncode on strings to make them into true HTML. To track exactly what is causing your errors, you could put a trace on the pages using the trace section of your web.config, and maybe a generic exception logging section in your global.asax using the protected void Application_Error(Object sender, EventArgs e) auto-event handler method. This could save exception details with the current state of your sessionstate etc off to a database.

    If you are using the same session for each simultaneous connection, you are modelling a potential user scenario. It's possible to recreate it by logging in to your application, and once you are in, creating a new window from that internet explorer window. Then you have one user following two or more distinct navigation paths through your application in the same session. Whether or not they would ever have problems from posting back two pages at the same time is questionable.


    Author Comment


    I was previously using HttpUtility.UrlEncode on the encrypted query strings and replacing it with Server.HtmlEncode seemed to stop the runtime exceptions when running the app within the load testing script, however, the load testing tool seems to be capturing those same exceptions as http request errors. When I expand the descriptions for these errors, they reference server side objects, strange. As before, I do not get these exceptions when running the application normally.  It's as if the Server.HtmlEncode encoding method causes the load testing script to swallow these errors so they don't bubble up to my central error handler in my global asax file.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now