You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing MailerMessageStore.SaveAsync, When i deployed the service to a server. All emails were failing. Eventually to diagnose the issue I cloned and built the project locally. The DataCommand.ExecuteAsync can swallow an exception if the ReadDotBlockAsync delegate returns an exception. In my case, due to an assembly issue it was raising System.MissingMethodException: Method not found. This is despite the problem command being wrapped in a try/catch in my code.
It should capture the exception and either log it somewhere (e.g. eventlog) or call an event or some other method so the caller can identify this exception occurred and decide how to handle it.
Example of my implementation:
public override async Task<SmtpResponse> SaveAsync(ISessionContext context, IMessageTransaction transaction, ReadOnlySequence<byte> buffer, CancellationToken cancellationToken)
{
try {
// call class.method in problem assembly
} catch (Exception ex) {
// do something with exception
// this is NOT triggered, it is caught in the DataCommand.ExecuteAsync
}
}
The text was updated successfully, but these errors were encountered:
While implementing MailerMessageStore.SaveAsync, When i deployed the service to a server. All emails were failing. Eventually to diagnose the issue I cloned and built the project locally. The DataCommand.ExecuteAsync can swallow an exception if the ReadDotBlockAsync delegate returns an exception. In my case, due to an assembly issue it was raising System.MissingMethodException: Method not found. This is despite the problem command being wrapped in a try/catch in my code.
the current SmtpServer code does:
It should capture the exception and either log it somewhere (e.g. eventlog) or call an event or some other method so the caller can identify this exception occurred and decide how to handle it.
Example of my implementation:
The text was updated successfully, but these errors were encountered: