tags:

views:

1062

answers:

3

The documentation provides a succinct example, and one that looks like it's missing a hop/pair anyway. When I set up a script to access a remote server and pattern my NTLM communication similarly, I get the following output:
...
All clients connected, Test beginning.
Invalid code received.
Error accepting remote connection.
message: Run error detected, terminating clients...
message: Terminating all instances of wcclient...
Connecting to:
...

My scenario works just fine when I comment out the 3 NTLM centric lines. It fails when they are uncommented. The WCAT client is able to parse the scenario, but I've not actually dug into the parsing mechanism yet to see whether it's parsing correctly.

(I've already fixed the bug that prevents connection from multiple remote clients, but there may be more.)

Here's the pertinent part of the scenario:

    request
    {
        url         = "http://weatherforecast-d/";
        statuscode  = 401;
    }

    request
    {
        url         = "http://weatherforecast-d/";
               // problems begin here...
          authentication = "ntlm";
          username = "my username";
          password = "my password";
        statuscode  = 200;
    }

If anyone has a running, functional example of a WCAT NTLM script, I'd be much obliged. Thank you.

I've cleaned up the logging in wcat.wsf and done numerous comparisons. There's got to be a better way to do this, but I don't know it.

  • "authentication" parses while other parm names do not
  • "username" and "password" don't cause fatal errors on their own
  • If I comment out the single parm line "authentication" the test runs
  • If I uncomment the same line it errors fatally
  • The script output is exactly the same up until the failure
  • basic or ntlm result in the same failure, as does any garbage text

The problem seems to be hidden deep in the wcclient. I guess I'll have to start looking for another product.

A: 

The error is in the documentation:

authentication = "ntlm";

Should be:

authentication = NTLM;

The parameter is not a dynstring, but a KEYWORD. The quotes throw the parser off the scent.

I'll mark this as answer, since it is, but I still have an issue. At present I cannot find the exactly correct recipe for teaching WCAT to recognize the 401 and 200 responses from the server. It recognizes some of the 401s and some of the 200s, but I cannot combine the right number of queries in any right combination to cause it to recognize everything.

codepoke
A: 

Hello,

I'm having very much the same problem - firstly I couldn't get the scripts to run, then found your answer about quote marks and finally the scripts parse. I'm now experiencing the same issue with recognition of status codes. I cannot, whatever I do, get my script to authenticate against the web server. It's a SharePoint site running on IIS6 and works perfectly using IE with either integrated NTLM authentication or prompted NTLM authentication.

The IIS logs show a stream of 401s, even with ONLY NTLM authentication requests for the default page in my Scenario file.

Have you had any luck yet getting NTLM authentication to work??

Thanks...

What I've found is the most logical combination of 401's and 200's results in over 80% of requests providing expected responses. I am definitely getting a number of successful 200's, I was just shooting for the moon. If you're not getting any 200's, something is wrong.
codepoke
Sounds like somthing's wrong then as the warmup report shows all connections with unexpected response and then the actual test period and the cooldown phase show nothing at all. The IIS logs are still just 401s all the way... thanks for your reply...
A: 

I also got the same error when I put port outside of the request to transaction. The error disappeared once port became a part of the request.

kateroh
You're listening on non-standard ports, right? Explictly specifying 80 on normal requests wouldn't make any errors go away, I assume.
codepoke