如何使用WS(Http)+ ClientCredentials.UserName

时间:2016-05-26 20:14:27

标签: c# wcf soap

BasicHttpBinding binding = new BasicHttpBinding();
endP = new EndpointAddress("http:......");
WebPortClient client = new WebPortClient (binding, endP);
client.ClientCredentials.UserName.UserName = "User";
client.ClientCredentials.UserName.Password = "Pass";

错误是 附加信息:服务器返回无效的SOAP错误。有关更多信息,请参阅InnerException。

我的InnerException说: {“开始元素'faultcode'命名空间'第1行是预期的。”元素被发现'faultcode'命名空间'http://schemas.oblix.com/ws/2003/08/Faults'。 ,172。“position}

什么错了? 谢谢

0 个答案:

没有答案