Soap客户端在调用WCF服务时抛出异常"连接尝试失败"

时间:2017-06-29 14:48:23

标签: c# wcf soap soap-client

我正在尝试使用SoapClient调用wcf服务。 这在部署的环境中工作正常,但是从本地调用时它会抛出异常:

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond XXX.XXX.XXX.XX:443

内部异常:

There was no endpoint listening at https://XXX/service.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. 

我使用下面的代码来调用我的服务:

    var client = new ServiceSoapClient();  
              
                try 
                { 
                    client.Open(); 
                    result = client.AllocateAddress( 
                        _companyName, 
                        _password, 
                        address.Street,  
                        address.Zip, 
                        lob, 
                        policyEffectiveDate.ToShortDateString());
}

任何帮助将不胜感激。

0 个答案:

没有答案
相关问题