禁用WCF帮助页面不起作用

时间:2014-12-18 23:48:58

标签: c# wcf

我想禁用WCF服务的帮助页面。它是以Service.svc / help结尾的文件。正如其他地方所推荐的那样,我将以下内容添加到我的web.config

<serviceDebug httpHelpPageEnabled="false" httpsHelpPageEnabled="false"/>

然而,我可以查看帮助页面。还有其他一些设置我应该改变吗?

1 个答案:

答案 0 :(得分:1)

您可能需要结帐:WCF help page - how to disable or change the displayed URL

`<system.serviceModel>
<services>
  <service name="MyNamespace.MyService" behaviorConfiguration="NoHelpPageBehavior">
    <endpoint address="" binding="basicHttpBinding" contract="MyNamespace.IMyContract" />
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="NoHelpPageBehavior">
      <serviceDebug httpHelpPageEnabled="false" httpsHelpPageEnabled="false"/>
    </behavior>
  </serviceBehaviors>
</behaviors>