I'm currently trying to create a performance test in Visual Studio 2013 for an older web application with numerous redirects. One of these redirects contains a url with a + in it.

<h2>Object moved to <a href="%2fPage.aspx%3fname%3dLYNDON+VROOMAN%26type%3dMyType">here</a>.</h2>

When Visual Studio attempts to run the web performance test and follows the redirect, it attempts to go to /Page.aspx?name=LYNDON VROOMAN&TYPE=MyType which of course returns a 400. The redirect, of course, is also not appearing in the recording.

I don't normally run performance tests on web sites with a GUI. I've tried added an HTMLEncoded flag to every parameter, and tried generating code and adding a replace to any of the strings that I can see.

I'm sure that it's something small that I'm missing, but, I'm not seeing it and my searches for information are coming back fruitless.

  • I think you are trying to go inside login during load testing. Do you? Jan 27, 2015 at 9:19
  • nope, there's no login here. The name is pulled in the backend via a call to another service. Jan 27, 2015 at 16:24
  • If there is no authentication then it should not show that "Object moved" to error. Jan 28, 2015 at 3:44
  • Hmm. I'll have to see if there's something that I'm not seeing right now. Jan 28, 2015 at 17:00

1 Answer 1


I had got the same issue with web performance test in Visual Studio 2013. Some redirects in my application contains a white space in their url

<h2>Object moved to <a href="/Error/SubErr.aspx?GROUP=MED SH&amp;USER=DAVID GOUPIL">here</a>.</h2>

When visual studio attempts this redirect, the web test returns a Bad request.

I finally use a WebTestPlugin to encode each query string parameters before each requests

public override void PreRequest(object sender, PreRequestEventArgs e)
    foreach (var queryStringParam in e.Request.QueryStringParameters)
        queryStringParam.UrlEncode = true;

And add this event to the PreRequest event on MyWebTest.

private MyWebTestPlugin myPlugin = new MyWebTestPlugin();     
public MyWebTest()
    this.PreAuthenticate = true;
    this.Proxy = "default";
    this.PreRequest += this.myPlugin.PreRequest;

Hope it helps


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.