ElmahCore不会自动检测用户名

时间:2019-07-05 20:28:19

标签: .net-core elmah

它说here自动检测到用户名和主机名。在sql中检测到主机名,但“用户”列为空。我想念什么?

enter image description here

    EmailOptions emailOptions = new EmailOptions
        {
            MailRecipient = Configuration["ErrorMailRecipient"],
            MailSender = "xx@xxx.com",
            SmtpServer = "smtp.sendgrid.net",
            AuthUserName = "xxxx",
            AuthPassword = "xxxx"
        };
        services.AddElmah<SqlErrorLog>(options =>
        {
            options.ConnectionString = Configuration["Data:ElmahConnection"];
            options.ApplicationName = Configuration["Data:ApplicationName"];
            options.Notifiers.Add(new ErrorMailNotifier("Email", emailOptions));
        });

0 个答案:

没有答案