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
看看您的应用程序池 –