【问题标题】:WCF "value cannot be null" error in event log事件日志中的 WCF“值不能为空”错误
【发布时间】:2014-12-21 15:03:14
【问题描述】:

我的服务器中的日志已满,我猜是 WCF 导致的此错误。我尝试了几天来找出导致它的原因,但没有运气。 我的 WCF 服务 (4.0) 托管在 iis 中,据我所知,运行良好。 也许有人知道?

【问题讨论】:

  • 如果您看到所有这些错误,则有些东西运作良好。尝试查看您的服务代码,并查看使用“ECF Provider Fault”作为源记录到事件查看器的内容。
  • 我找到了将此消息写入事件日志的位置,但我现在无法将此更改上传到生产服务器。有没有办法禁用 System.Diagnostics eventLog 写入?
  • 无需在生产服务器上进行更改,不会。

标签: .net wcf iis iis-7


【解决方案1】:

我找到了停止将所有信息写入事件日志的方法。 这就是我所做的:我将 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>

【讨论】:

    猜你喜欢
    • 2011-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-07
    • 2010-09-06
    • 1970-01-01
    相关资源
    最近更新 更多