Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCFTestClient - how can I add username and pass?

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

like image 471
Hcabnettek Avatar asked Jul 21 '10 16:07

Hcabnettek


People also ask

How do I change my WCF username and password?

To configure a service to authenticate its clients using Windows Domain username and passwords use the WSHttpBinding and set its Security. Mode property to Message . In addition you must specify an X509 certificate that will be used to encrypt the username and password as they are sent from the client to the service.

How will you implement basic authentication in WCF service?

To be able to integrate Basic Authentication with WCF REST, we have to extend the functionality of the WCF framework. The extension is divided into three steps: Find the extension point to apply behavior to all operations of the service. Create a custom authentication mechanism based on existing standards.


1 Answers

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!

like image 164
marc_s Avatar answered Oct 03 '22 23:10

marc_s