如何使用 basicHttpBinding(SOAP,而不是 REST)启用 Wcf 帮助页面

rob*_*nwk 3 c# wcf soap

我正在尝试启用 在我的 Wcf 服务中Wcf 服务帮助页面,但没有尝试工作,没有可用的帮助页面,链接下有服务的方法描述<.....{servicename}.svc/help>

我尝试了我设法找到的任何提示,但没有结果。

完全可以为 wcf 服务启用自动帮助页面 basicHttpBinding

我的 Wcf 服务托管在 Asp.net 应用程序中

这是we.config 中我的 wcf 配置部分:

<serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
        <behavior name="EcoscadaApi">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" httpGetUrl="" />
          <serviceDebug includeExceptionDetailInFaults="true" httpHelpPageEnabled="true"   httpsHelpPageEnabled="true" />
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="EndpointBehavior">
          <webHttp helpEnabled="true"/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_HvacControlService" sendTimeout="00:05:00" />
        <binding name="ecoWcfBinding" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647"  >
          <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service name="EcoSCADA.Web.Services.Wcf.BuildingComponentService" behaviorConfiguration="EcoscadaApi">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost/Services/wcf/BuildingComponentService" />
          </baseAddresses>
        </host>
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="ecoWcfBinding" contract="EcoSCADA.Web.Services.Wcf.IBuildingComponentService" />
        <endpoint address="mex" binding="mexHttpBinding" name="Metadata"  contract="IMetadataExchange" />
      </service>
Run Code Online (Sandbox Code Playgroud)

任何评论/提示将不胜感激。

BCd*_*WEB 6

你试过这个吗:

<endpointBehaviors>
    <behavior name="DefaultEndPointBehavior">
        <webHttp helpEnabled="true" />
    </behavior>
</endpointBehaviors>
Run Code Online (Sandbox Code Playgroud)

更新:看着这个,我注意到它们包含帮助页面的特定端点:

<services>
  <service behaviorConfiguration="RESTWebServiceBehavior" name="RESTWebService">
    <endpoint address="" kind="webHttpEndpoint" behaviorConfiguration="RESTEndpointBehavior" contract="IHello" />
  </service>
</services>
Run Code Online (Sandbox Code Playgroud)