开发者

WCFTestClient - how can I add username and pass?

开发者 https://www.devze.com 2023-01-08 19:30 出处:网络
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 co

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 progr开发者_JS百科amatically 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


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消