2010-08-27 41 views

回答

9

在生产,你可以通过添加此页关闭:

<behaviors> 
    <serviceBehaviors> 
    <behavior name="ProductionService"> 
     <serviceDebug includeExceptionsInDetail="false" httpHelpPageEnabled="false" /> 
    </behavior> 
    <serviceBehaviors> 
</behavirs> 

想想也发布WSDL /元数据。如果你不希望发布WSDL,但要使用MEX端点使用以下配置:

<behaviors> 
    <serviceBehaviors> 
    <behavior name="ProductionService"> 
     <serviceMetadata httpGetEnabled="false" /> 
     <serviceDebug includeExceptionsInDetail="false" httpHelpPageEnabled="false" /> 
    </behavior> 
    <serviceBehaviors> 
</behavirs> 

你的服务必须在其behaviorConfiguration属性使用这些行为。

-1

是的,这是不好的。它表示潜在的攻击者认为系统没有完全配置,所以他们会试图攻击它。另外,它不是很专业。

好,打印一些有用的东西存在或隐藏:-)

+3

我怎样才能打印一些东西,而不是默认的欢迎页面? – 2010-08-31 17:00:22