我的事件日志中充斥着以下消息:
请求的
窗体身份验证失败。原因:提供的工单已过期。
我认为这是在人们超时而不是注销时发生的。
首先,这不是一个错误,它是Type: Information
我不需要此信息,如何阻止ASP.NET记录此信息?
我的应用程序不是基于web的,而是使用静态的机器密钥。
发布于 2010-04-28 04:03:27
以下是解决方案:
<?xml version="1.0"?>
<configuration>
<system.web>
<healthMonitoring>
<rules>
<remove name="Failure Audits Default" />
</rules>
</healthMonitoring>
</system.web>
</configuration>
请注意,这将防止注销所有System.Web.Management.WebFailureAuditEvent
事件,这涵盖了事件范围4005-4011。可能有一种方法可以删除4005,但这个解决方案对我来说已经足够好了。
这些链接对我很有帮助:
发布于 2011-07-08 07:43:14
除了Max Toro的解决方案,对于好奇的人来说,这似乎是将4006添加到4011的方法:
<healthMonitoring enabled="true">
<providers>
<add name="EventLogProvider" type="System.Web.Management.EventLogWebEventProvider,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
<eventMappings>
<!-- Event Mappings for 0-4004 and 4006 to infinite, skipping 4005, see last attribute of these entries -->
<add name="Failure Audits 1" type="System.Web.Management.WebFailureAuditEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" endEventCode="4004"/>
<add name="Failure Audits 2" type="System.Web.Management.WebFailureAuditEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="4006" endEventCode="2147483647"/>
</eventMappings>
<rules>
<!-- REMOVE ITEMS NOTED BY MAX -->
<remove name="Failure Audits Default"/>
<!-- ADD Back 4006 to 4011 with these two entries, skipping over 4005 -->
<add name="Failure Audits Default 1" eventName="Failure Audits 1" provider="EventLogProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom=""/>
<add name="Failure Audits Default 2" eventName="Failure Audits 2" provider="EventLogProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom=""/>
</rules>
</healthMonitoring>
看起来对我很管用。
https://stackoverflow.com/questions/2686324
复制相似问题