2014-12-21 48 views
0

我猜,我的服務器中的日誌滿了WCF的這個錯誤原因。我試了好幾天才發現是什麼原因造成的,但沒有運氣。 我的WCF服務(4.0)託管在iis中,據我所知,運行良好。 也許有人知道?事件日誌中的Wcf錯誤

謝謝。

enter image description here

+1

東西是*不*工作好,如果你看到所有這些錯誤。請嘗試查看服務代碼,並使用「ECF提供程序錯誤」作爲源,查看正在將事件查看器記錄到事件查看器的內容。 – Tim

+0

我發現將此消息寫入事件日誌的位置,但現在無法將此更改上傳到生產服務器。有沒有辦法禁用System.Diagnostics的eventLog寫作? –

+0

不對生產服務器進行更改, –

回答

0

我找到了辦法來阻止信息的每一位寫入事件日誌。 這就是我所做的:我將TraceLevelSwitch設置爲1 - 僅限錯誤。

<system.diagnostics> 
 
    <switches> 
 
     <!-- This switch controls data messages. In order to receive data 
 
     trace messages, change value="0" to value="1" --> 
 
     <add name="DataMessagesSwitch" value="0" /> 
 
     <!-- This switch controls general messages. In order to 
 
     receive general trace messages change the value to the 
 
     appropriate level. "1" gives error messages, "2" gives errors 
 
     and warnings, "3" gives more detailed error information, and 
 
     "4" gives verbose trace information --> 
 
     <add name="TraceLevelSwitch" value="1" /> 
 
    </switches> 
 
</system.diagnostics>