请求的表单身份验证失败.原因:提供的故障单已过期

Max*_*oro 19 .net asp.net

我的事件日志充满了这条消息:

请求的表单身份验证失败.原因:提供的故障单已过期.

我认为当人们超时而非注销时会发生这种情况.

首先,这不是一个错误,它是 Type: Information

我不想要这些信息,如何阻止ASP.NET记录它?

我的应用程序不是web-farmed,而是使用静态机器密钥.

Max*_*oro 17

这是解决方案:

<?xml version="1.0"?>
<configuration>
   <system.web>
      <healthMonitoring>
         <rules>
            <remove name="Failure Audits Default" />
         </rules>
      </healthMonitoring>
   </system.web>
</configuration>
Run Code Online (Sandbox Code Playgroud)

请注意,这将阻止注销所有System.Web.Management.WebFailureAuditEvent事件,这些事件涵盖事件范围4005-4011.可能有一种方法可以删除4005,但这个解决方案对我来说已经足够了.

这些是帮助我的链接:


Moe*_*ard 9

添加到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>
Run Code Online (Sandbox Code Playgroud)

似乎为我工作.