[英]WCF windows service to use https
我的任務是對現有WCF服務進行一些更改(我沒有使用WCF的過往經驗)。 該服務作為Windows服務運行。 客戶端應用程序通過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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.