[英]WCF service in client returns 404 over https
服务器上的web.config
设置:
<service name="ExporterWebService">
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="secureHttpBinding"
contract="IExporterWebService"/>
<endpoint address="mex"
binding="mexHttpsBinding"
contract="IMetadataExchange" />
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
和客户端app.config
是:
<client>
<endpoint
address="https://sample.coom/webservice/rwar.svc"
binding="wsHttpBinding" bindingConfiguration="basicHttpBinding"
contract="IRIBExporterWebService.IExporterWebService"
name="BasicHttpBinding_IExporterWebService"/>
</client>
<basicHttpBinding>
<binding name="BasicHttpBinding_IExporterWebService" maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
我正在尝试使用 SSL 测试 WCF,但似乎遗漏了一些东西,我进行了大量搜索,但似乎无法找到我缺少的配置,我在 IIS 中托管了一个基本的 WCF 服务,我还有一个调用 WCF 服务的测试客户端 Web 应用程序。
请帮忙!!! :-)
添加服务引用时,您应该在客户端键入错误的服务地址。
客户端不会产生由创建服务端点Wshttpbinding
消费通过创建服务时Basichttpbiding
。
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="secureHttpBinding" contract="IExporterWebService"/>
<endpoint address="https://sample.coom/webservice/rwar.svc" binding="wsHttpBinding" bindingConfiguration="basicHttpBinding" contract="IRIBExporterWebService.IExporterWebService" name="BasicHttpBinding_IExporterWebService"/>
此外,服务器使用一个空的相对端点地址,而您的客户端有一个webservice
前缀。
<client> <endpoint address="https://sample.coom/webservice/rwar.svc" binding="wsHttpBinding" bindingConfiguration="basicHttpBinding" contract="IRIBExporterWebService.IExporterWebService" name="BasicHttpBinding_IExporterWebService"/>
此外,请在拨打电话前信任服务器证书以建立安全连接。
我有一个错误,我们在服务器上通过拖曳地址拖曳了 webservice,我忘了在服务器上设置配置 https webService new 谢谢各位朋友
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.