WCF Rest服务的SSL实现

WCF Rest服务的SSL实现,wcf,rest,ssl,web-config,wcf-binding,Wcf,Rest,Ssl,Web Config,Wcf Binding,我在Web.CONFIG文件中还有什么要考虑的吗?下面是我的服务界面 <system.serviceModel> <!--WCF Service--> <services> <service name="Service.RestServices"> <endpoint address="" binding="basicHttpBinding" bindingConfig

<>我在Web.CONFIG文件中还有什么要考虑的吗?下面是我的服务界面

 <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>    
服务接口(IRestServices)
[运营合同]
[WebInvoke(ResponseFormat=WebMessageFormat.Json,RequestFormat=WebMessageFormat.Json,Method=“POST”,UriTemplate=“Login”,BodyStyle=WebMessageBodyStyle.Wrapped)]

当我尝试使用HTTPS调用时,我得到的响应是404(未找到),而使用HTTP时,我得到的响应数据是正确的


如何使用HTTPS调用rest api web服务(WCF)?

我们必须在WebService.svc文件中定义工厂,以支持WCF rest服务中的HTTPS

Service Interface(IRestServices)


您是否已验证该服务具有HTTPS绑定?可能是为了响应HTTP而设置的only@VolkanPaksoy我如何验证服务是否有HTTPS绑定?是否有其他示例,谢谢。查看您的应用程序池,我应该查看应用程序池中的哪些内容?是否启用了
HTTPS
<%@ ServiceHost Language="C#" Debug="true" Service="XcellenceIt.Plugin.Misc.NopRestApi.Service.RestServices" Factory="System.ServiceModel.Activation.WebServiceHostFactory" %>