繁体   English   中英

WCF Web服务不适用于https

[英]WCF web service is not working with https

我的Web服务在http上运行正常,但在https上却无法运行。 我认为web.config上存在一些错误,我也将web.config更改为https,但对我而言不起作用。

<system.serviceModel >
<!--<serviceHostingEnvironment multipleSiteBindingsEnable ="true"></serviceHostingEnvironment>-->
<services>
  <service name="DriverSuvidhaAppService.Driversuvidhaservice" behaviorConfiguration="serviceBehave">
    <endpoint address="" behaviorConfiguration="webHttp" binding="webHttpBinding" contract="DriverSuvidhaAppService.IDriversuvidhaservice"/>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>   
    <host>
      <baseAddresses>
      </baseAddresses>
    </host>
  </service>
</services>
<bindings>
  <netTcpBinding>
    <binding name="TcpBindingConfiguration">
      <security mode="Transport">
        <transport clientCredentialType="None"/>
      </security>
    </binding>
  </netTcpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="serviceBehave">
      <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
      <serviceMetadata httpGetEnabled="true" 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>
  <endpointBehaviors>
    <behavior name="webHttp">
      <webHttp helpEnabled="true" automaticFormatSelectionEnabled="false" defaultBodyStyle="Bare" defaultOutgoingResponseFormat="Json"/>
    </behavior>
  </endpointBehaviors>
</behaviors>
<protocolMapping>
  <add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>-->

按照Microsoft的分步指南,使用SSL-配置您的WCF,

如何:使用SSL配置IIS托管的WCF服务

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM