Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "Sbasso58"

I could do it tnx

I need to grant access to your github repository to my developer. His Github account is [email protected]. He had an access linked to another AspNetZero account, but he is now working for me. Please associate him to my account.

Thanks *** Done Solved ****

Stefano Basso

Hi Velu, Hi everybody here.

Thanks for sharing your projects and your ideas.

I am looking at devexpress reporting / telerik rerporting solution for .net core/angular and i would appreciate if you could share your project.

Many thanks in advance.

Stefano [email protected]

Thanks for your guidance. This is what I have at the moment. Maybe it can help somebody else:

public class GlobalExceptionEventHandler : IEventHandler<AbpHandledExceptionData>, ITransientDependency
    {
        private readonly IEmailSender _emailSender;
        private readonly IConfigurationRoot _configurationRoot;

    public GlobalExceptionEventHandler(IEmailSender emailSender, IConfigurationRoot configurationRoot)
    {
        _emailSender = emailSender;
        _configurationRoot = configurationRoot;
    }

    public void HandleEvent(AbpHandledExceptionData eventData)
    {
        string subject = eventData.Exception?.Message.TruncateWithPostfix(200).CleanUpSubject();

        if (!string.IsNullOrWhiteSpace(subject))
        {
            string exceptionDetails = eventData.Exception?.ToString();

            string recipient = _configurationRoot["ErrorEmailRecipient"];

            _emailSender.Send(recipient, subject, exceptionDetails, false);
        }
    }
}

Hi,

I'm wondering if there is some built-in mechanism to receive email notifications when an unhandled exception occurs. Something like Elmah does on Web Api 2.

Thanks

Showing 1 to 5 of 5 entries