Compilation error when tester encounters AddCredentials
kconklin
Posts: 14
Hello,
I'm trying the script tester but I'm consistently getting a script compilation error "Name 'Authentication' is not declared" on the following line:
WebClient.HttpRequest.AddCredentials(Authentication.AuthType.NTLMv2, "domain", "username", "password")
I've also tried replacing the enum reference with the constant value, in which case I get an error telling me that AddCredentials was called with the wrong number of arguments.
I'm trying the script tester but I'm consistently getting a script compilation error "Name 'Authentication' is not declared" on the following line:
WebClient.HttpRequest.AddCredentials(Authentication.AuthType.NTLMv2, "domain", "username", "password")
I've also tried replacing the enum reference with the constant value, in which case I get an error telling me that AddCredentials was called with the wrong number of arguments.
Kevin Conklin
Software Design Engineer in Test
Xerox Global Services
Software Design Engineer in Test
Xerox Global Services
Comments
I'll change the program so the script compilation will not fail, but I'm not going to support the addcredentials method as Internet Explorer will transparently pass your logon credentials anyway.
I've now updated the ANTS Script tester so that there is a dummy method for addcredentials. The script test run should still work with Windows authentication as it should pass your current login credentials instead of whatever you have specified in the AddCredentials method.
I've chosen not to fully implement AddCredentails because it would involve risking a bit too much of the ANTS Load source code to disassembly by 'curious' users.