问题描述
我想使用soap网络服务。我收到这个错误
System.ServiceModel.CommunicationObjectFaultedException: 'The 通信对象,System.ServiceModel.ChannelFactory`1[.....], 无法用于通信,因为它处于故障状态。'
我的代码是这样的:
public Service_res getUnits()
{
myServiceClient client = new myServiceClient("SoapHttpBinding");
client.ClientCredentials.Windows.ClientCredential.UserName = "usrname";
client.ClientCredentials.Windows.ClientCredential.Password = "pass";
Service_res res = client.myServiceFunc(new Service_req());
return res;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)