我的任务是对现有的WCF服务进行一些更改(我以前没有任何使用WCF的经验)。此服务作为windows-service运行。客户端应用程序通过http连接到它,调用Datagram.Services中公开的方法。我只需要更改它,使客户端应用程序只能使用https (而不是http)进行连接。仅仅通过修改配置文件就可以做到这一点吗?如果是这样的话,有什么建议需要在下面的配置文件中进行更改以实现它。此外,客户端是否必须安装证书才能连接到此应用程序?
<system.serviceModel>
<services>
<service name="Datagram.Services" behaviorConfiguration="Datagram_Behavior">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="" name="Datagram.Service" contract="Datagram.IServices" />
<endpoint address="mex" binding="mexHttpBinding" name="MEX" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:5000/Datagram" />
</baseAddresses>
<timeouts closeTimeout="00:01:00" openTimeout="00:05:00" />
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Datagram_Behavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel> 发布于 2012-10-31 17:39:31
您是否启用了传输级安全性?
http://www.codeproject.com/Articles/36705/7-simple-steps-to-enable-HTTPS-on-WCF-WsHttp-bindi
https://stackoverflow.com/questions/13147769
复制相似问题