如果你是一個初學者,很難拿起網絡服務,這並不是因爲這個概念很難 - 它不是 - 但是因爲這項技術經歷了很多曲折和搜索,Google尋求幫助沒有幫助,如果你所得到的回報是稍微不同的實現的答案。將「HelloWorld」WCF Web服務轉換爲使用https?
[例如我們的解決方案還從未有過一個.svc文件或.asmx文件,儘管這些答案中經常露面,我們的web.config中沒有任何behavior
或binding
元素,正如其他人似乎]
我們已經使用了一個教程來設置我認爲在IIS6上運行的「WCF Web服務」。它工作正常。
但我們想將其轉換爲使用加密/ https。
因此,我們已經檢查了需要在IIS安全通道箱:
不知道還有什麼可以在那裏配置,但是...無論如何,繼續前進。接下來,我會想象我們必須修改我們的web.config文件...但是什麼和如何?以下是我們在我們的web.config system.serviceModel
下了:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"></serviceHostingEnvironment>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"></standardEndpoint>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
那麼,我們下一步需要做什麼?