【发布时间】:2020-04-19 19:14:46
【问题描述】:
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,但似乎遗漏了一些东西,我进行了大量搜索,但似乎无法找到我在配置中遗漏的内容,我有一个基本的 WCF 服务托管在IIS,我还有一个测试客户端 Web 应用程序正在调用 WCF 服务。
请帮忙!!! :-)
【问题讨论】:
-
你添加https绑定到服务器吗?
-
是的,服务器正常,其他客户端现在使用,只是我客户端出错
-
你在
<wsHttpBinding>绑定like here中有<security mode="Transport">吗? -
你能告诉我们
bindingConfiguration="secureHttpBinding"是如何在服务器上配置的吗? -
@marc_s 亲爱的,服务器中的secureHttpBinding 配置是:
<binding name="secureHttpBinding"> <security mode="Transport"> <transport clientCredentialType="None"/> </security> </binding>
标签: c# asp.net winforms web-services wcf