我正在将现有服务从HTTP(Dev/UAT)迁移到HTTPS(生产),我遇到配置问题.这是我的web.config的system.serviceModel部分:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
<services>
<service name="MyService">
<endpoint name="MyEndpoint" address="" binding="wsHttpBinding"
bindingConfiguration="secureBinding" contract="IMyService" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="secureBinding">
<security mode="Transport"></security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
Run Code Online (Sandbox Code Playgroud)
我已经试过这同时使用basicHttpBinding和wsHttpBinding,与相同的结果:
http://server.domain.com/MyService.svchttps://server.domain.com/MyService.svchttps://server.domain.com/MyService.svc- 我的SOAP客户端调用服务- 调用总是错误404: not found.我的https站点使用由公司域上的CA颁发的证书进行了认证,并且我已经验证我已在Trusted Root Certification Authorities我正在进行呼叫的系统上安装了CA的证书.
相关客户代码:
Service service = new Service();
service.Url = "http://server.domain.com/MyService.svc";
//service.Url = "https://server.domain.com/MyService.svc";
service.WebMethodCall();
Run Code Online (Sandbox Code Playgroud)
编辑
以下是WSDL的请求部分:
<wsdl:types/> …Run Code Online (Sandbox Code Playgroud)