There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Email Listener is Asych which fails in ASP.NET
Symptom: Intermittent failure of email listener to send email, even when flooding control is turned off.
Cause: The email listener is asynch, which just dies when invoked from the context of an ASP.NET page.
2014-08-07 19:51:51Z  Verbose System.Net 0:  SmtpClient#19832188::SendAsync(DeliveryMethod=Network)
2014-08-07 19:51:51Z  Error System.Net 0:  Exception in SmtpClient#19832188::Send - Asynchronous operations are not allowed in this context. Page starting an asynchronous operation has to have the Async attribute set to true and an asynchronous operation
can only be started on a page prior to PreRenderComplete event..
at System.ComponentModel.AsyncOperation.CreateOperation(Object userSuppliedState, SynchronizationContext syncContext)
at System.Net.Mail.SmtpClient.SendAsync(MailMessage message, Object userToken)
2014-08-07 19:51:51Z  Verbose System.Net 0:  Exiting SmtpClient#19832188::SendAsync()
Suggested fix: Check for HttpContext.Current -- if it isn't Null, don't send Asych or at least allow this asych behavior to be turned off.