1
我已经使用渠道工厂创建了一个WCF客户端。 但我无法连接到另一台机器上的服务器。我得到(407)Prxy身份验证必需的例外。我在哪里可以在我的WCF客户端中指定代理凭证?
WSHttpBinding wsBinding = new WSHttpBinding();
wsBinding.BypassProxyOnLocal = true;
EndpointAddress endpoint =
new EndpointAddress("http://machineName:7676/MyWCFService");
ChannelFactory<IService> sericeInterface =
new ChannelFactory<IService>(wsBinding, endpoint);
sericeInterface.Credentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
sericeInterface = sericeInterface.CreateChannel();
这是我的客户端连接代码nippet。我在调用服务的方法时遇到异常。
问题是有关代理证书,而不是客户端凭证。 – picrap 2013-04-19 14:00:14
您可以删除或修复此问题吗? – 2013-04-26 13:38:52