31

I'm using the WCFTestClient to debug a service. This normally works like a charm. This particular service is using SSL and I need to pass the user name and password. I can right click and edit the config file, but I do not see a place where I can inject the user name and password. On the normal client app for this service, we programatically set the credentials, how do I do this using the tools WCFTEstClient or ServiceConfigurationEditor. Anyone out there know how to do this? Here's how I do it in code.

_client.ClientCredentials.UserName.UserName = ConfigurationManager.AppSettings["name"];
_client.ClientCredentials.UserName.Password = ConfigurationManager.AppSettings["pass"];

Thanks for any help.
Cheers,
~ck in San Diego

Hcabnettek
  • 12,678
  • 38
  • 124
  • 190

1 Answers1

38

I don't think you can do that with the WCF Test Client. It's a fairly limited and simplistic tool - works great in simple scenarios, but stops fairly quickly.

If you need more features and abilities, you might want to look at SoapUI which is a SOAP/web services testing tool and works quite well - the normal edition is free, too!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 5
    Just a comment for those using SoapUI so you don't have to look this up elsewhere - to pass credentials like the example given in the OP, you would set the WSS-PasswordType = PasswordText and then set the username and password all in the request properties window. – Jim Nov 13 '13 at 19:12
  • 8
    Whats the point of Microsoft making a tool, if it can not pass any credentials!? This is ridiculous. I've never heard of a real life WCF without credentials! – hamish Jul 18 '14 at 02:44
  • 1
    When using authentication in SoapUI, I couldn't get the domain field to work for me. Instead I prepended the domain name to the username in the standard way: myDomain\MyUserName and left the Domain field empty. – goku_da_master Oct 23 '14 at 23:02
  • 1
    One more thing... and since I was using an endpoint with basic bindings and not wss bindings I had to leave the wss-password type to none. – goku_da_master Oct 23 '14 at 23:09