我想禁用WCF服务的帮助页面。它是以Service.svc / help结尾的文件。正如其他地方所推荐的那样,我将以下内容添加到我的web.config
中<serviceDebug httpHelpPageEnabled="false" httpsHelpPageEnabled="false"/>
然而,我可以查看帮助页面。还有其他一些设置我应该改变吗?
答案 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>