2010-08-27 37 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