查看添加的服务地址是不是https开头的,而 *.config 文件里面自动添加的链接变成了http,当前的bindbing类型为basicHttpBinding,
解决方法:在config文件里面手动将链接的http变为httpps, binding类型变成basicHttpsBinding既可。
下面是一个demo:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpsBinding>
<binding name="INF_AXATAWSSoap" />
</basicHttpsBinding>
</bindings>
<client>
<endpoint address="https://www.xxxx.com/WSAXA/WebServices/INF_AXATAWS.asmx"
binding="basicHttpsBinding" bindingConfiguration="INF_AXATAWSSoap"
contract="Api.INF_AXATAWSSoap" name="INF_AXATAWSSoap" />
</client>
</system.serviceModel>
</configuration>