locked
Unauthorized Errors fail Load Tests within secure website with security token in header RRS feed

  • Question

  • I am attempting to load test my website using Web Performance tests in VS 2013 and the test fails with Unauthorized(401, 404, 500 errors).  

    Also, I do not see the server request/response traffic for the calls in Fiddler.  I read that Web Performance tests are headless requests - my site has security tokens in header that needs to be read at the server.  Is this the cause of the errors?

    In short, can I run load tests for a secure(https) application and is there any properties I need to alter for my server calls to not fail? 

    Thanks

    Friday, July 25, 2014 12:15 PM

Answers

  • Hi,

    my site has security tokens in header that needs to be read at the server.  Is this the cause of the errors?

    I think this is the cause.

    Visual Studio web performance test provides a method to add a header for a request. You can right click a request and select ‘Add headers’.

    Generally we don’t need to worry about the headers when we record web tests, most HTTP headers are set from the browser template file, when recording tests, the web test recorder will record the default contents of IE browser template file and some additional HTTP headers. If your request sends additional custom headers to server such as authentication infomormation, you can configure the recorder setting: RequestHeadersToRecord to add the header, like under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\EnterpriseTools\QualityTools\Web LoadTest Adding a string value under this key with the name "RequestHeadersToRecord" and value="SOAPAction;Authorization;Pragma;x-microsoftajax "

    For more information, please see ‘Filtering HTTP Headers’ section in this blog:
    Web Test Authoring and Debugging Techniques for VS 2008

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Thursday, July 31, 2014 1:29 AM
    • Marked as answer by Amanda Zhu Friday, August 1, 2014 7:15 AM
    Monday, July 28, 2014 6:21 AM

All replies

  • Hi wertr,

        You can run a load test against a secure(https) without changing any properties. Is this application authentication using NTLM to validate access? 

    Regards,

    Matt M.

    Friday, July 25, 2014 2:08 PM
  • Hi,

    my site has security tokens in header that needs to be read at the server.  Is this the cause of the errors?

    I think this is the cause.

    Visual Studio web performance test provides a method to add a header for a request. You can right click a request and select ‘Add headers’.

    Generally we don’t need to worry about the headers when we record web tests, most HTTP headers are set from the browser template file, when recording tests, the web test recorder will record the default contents of IE browser template file and some additional HTTP headers. If your request sends additional custom headers to server such as authentication infomormation, you can configure the recorder setting: RequestHeadersToRecord to add the header, like under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\EnterpriseTools\QualityTools\Web LoadTest Adding a string value under this key with the name "RequestHeadersToRecord" and value="SOAPAction;Authorization;Pragma;x-microsoftajax "

    For more information, please see ‘Filtering HTTP Headers’ section in this blog:
    Web Test Authoring and Debugging Techniques for VS 2008

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Thursday, July 31, 2014 1:29 AM
    • Marked as answer by Amanda Zhu Friday, August 1, 2014 7:15 AM
    Monday, July 28, 2014 6:21 AM