0
<system.serviceModel>
<!--WCF Service-->
<services>
<service name="Service.RestServices">
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="secureHttpBinding"
contract="Service.IRestServices"/>
<endpoint address="mex"
binding="mexHttpsBinding"
contract="Service.IRestServices" />
</service>
</services>
<!--WCF Binding-->
<bindings>
<basicHttpBinding>
<binding name="secureHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<!--WCF Behaviors-->
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
SSL實現是有什麼事我想在我的Web.config文件的考慮?以下是我的服務界面。
Service Interface(IRestServices)
[OperationContract] [WebInvoke(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, Method = "POST", UriTemplate = "Login", BodyStyle = WebMessageBodyStyle.Wrapped)]
當我嘗試使用HTTPS則迴應,我去打電話是404(未找到),而使用HTTP,我得到的響應數據正常。
如何使用HTTPS調用我的其餘api Web服務(WCF)?
您是否驗證服務有一個HTTPS綁定?可能它設置爲僅對HTTP響應 –
@VolkanPaksoy 如何驗證服務是否具有HTTPS綁定?有沒有任何示例比請建議,謝謝。 – Hrdk
看看您的應用程序池 –