I don't want to receive emails about
"The wait operation timed out"
error
what is wrong in my code? because I still getting emails about this error
What I have tried:
my config file
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http:
-->
<configuration>
<configSections>
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/>
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah"/>
</sectionGroup>
</configSections>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="Elmah.ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
<add name="Elmah.ErrorMail" type="Elmah.ErrorMailModule" preCondition="managedHandler" />
</modules>
<handlers>
<add name="Elmah" path="elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
</handlers>
</system.webServer>
<elmah>
<security allowRemoteAccess="0" />
<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/SiteData/ErrorLog" />
<errorMail from="xxx"
to="xxx"
subject="Error"
async="true"
smtpPort="26"
smtpServer="xxx"
userName="xxx"
password="xxx">
</errorMail>
</elmah>
<location path="elmah.axd">
<system.web>
<authorization>
<allow roles="Admin" />
<deny users="*" />
</authorization>
</system.web>
</location>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="20480" executionTimeout="1800"/>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
</httpModules>
</system.web>
<appSettings>
<add key="aspnet:MaxHttpCollectionKeys" value="5000"></add>
</appSettings>
</configuration>
code in Global.asax
void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
{
if (e.Exception.Message.Contains("The wait operation timed out"))
e.Dismiss();
}