0
我的任务是对现有WCF服务进行一些更改(我没有任何使用WCF的经验)。此服务作为Windows服务运行。客户端应用程序通过http连接到它,调用Datagram.Services中公开的方法。我只需要改变它,以便客户端应用程序只能使用https(而不是http)进行连接。是否可以通过修改配置文件来实现?如果是这样,任何建议什么需要改变下面的配置文件来完成它。客户还需要安装证书才能连接到此应用程序?WCF windows服务使用https
<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>