WCF XML 信息未显示在实时服务器上

WCF XML information is not displaying on live server

我创建了一个 WCF 服务。当我部署在本地测试服务器上时,它显示 xml 信息。但是当我尝试在实时服务器上部署时,它没有在实时服务器上显示 XML 信息。我的本地测试 url 是 Test URL when i click on Link it is displaying my function xml information. But When i deployed on live it is not displaying xml information Live URL。我的本地服务器是http,live是https。

Web 配置服务模型

<system.serviceModel>
<client />
<services>
  <service name="xCBLSoapWebService.MeridianService">
    <endpoint binding="wsHttpBinding" bindingConfiguration="NewBinding0" contract="xCBLSoapWebService.IMeridianService" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>
<bindings>
  <wsHttpBinding>
    <binding name="NewBinding0" closeTimeout="04:01:00" openTimeout="04:01:00" receiveTimeout="04:10:00" sendTimeout="04:01:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
      <readerQuotas maxDepth="128" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
    <binding name="WSHttpBinding_IMeridianService">
      <security mode="None" />
    </binding>
  </wsHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
      <serviceMetadata httpGetEnabled="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="true" httpHelpPageEnabled="true" />
      <dataContractSerializer maxItemsInObjectGraph="52428800" />
    </behavior>
  </serviceBehaviors>
  <endpointBehaviors>
    <behavior name="AjaxBehavior">
      <enableWebScript />
      <webHttp helpEnabled="true" />
    </behavior>
  </endpointBehaviors>
</behaviors>
<protocolMapping>
  <add binding="wsHttpBinding" scheme="http" bindingConfiguration="NewBinding0" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

你能帮我解决这个问题吗?谢谢

这很可能是 HTTPS 要求 'httpsGetEnabled' 启用的结果。

<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>

点击 link,您似乎找到了解决此问题的方法,我们必须设置以下代码片段以通过 HTTPS 公开服务元数据。

<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>

我们需要注意的另一件事是,我们必须配置额外的服务端点以启用通过 HTTPS 提供的服务,因为服务器仅启用了 Https 协议。
请参考以下代码。

    <bindings>
      <wsHttpBinding>
        <binding name="httpsbinding">
          <security mode="Transport">
            <transport clientCredentialType="None"></transport>
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <protocolMapping>
      <add binding="wsHttpBinding" scheme="https" bindingConfiguration="httpsbinding"/>
</protocolMapping>

如果有什么我可以帮忙的,请随时告诉我。