我正在尝试使用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());
}
任何帮助将不胜感激。