Base solution for your next web application

Activities of "wangwei22"

Hi! I am using UserManager to send email, but it doesn't work. Do I need to config something, is EmailService of UserManager? In Abp, there's a class Abp.Net.Mail.Smtp.SmtpEmailSender, how do use it with UserManaer? Please give me some tip or sample. Thanks.

_userManager.SendEmail(
                        user.Id,
                        "subject",
                        "main content"
                        );

Hi, When learning Module Zero's sample, I got the follow error when try to login:

{"UPDATE 语句与 FOREIGN KEY SAME TABLE 约束"FK_dbo.AbpUsers_dbo.AbpUsers_LastModifierUserId"冲突。该冲突发生于数据库"QrCodeCMSMZ",表"dbo.AbpUsers", column 'Id'。\r\n语句已终止。"}

The meaning in English: UPDATE statement conflicted with TABLE FOREIGN KEY constraint '<foreign key constraint name>'. The conflict occurred in database '<database name>', table '<table name>'. The statement has been terminated.

My User class:

public class User : AbpUser<Tenant, User>
{
/// <summary>
/// </summary>
public virtual int UserType { get; set; }

/// <summary>
/// </summary>
public virtual int? CompanyId { get; set; }
[ForeignKey("CompanyId")]
public virtual Company Company { get; set; }

public override string ToString()
{
    return string.Format("[User {0}] {1}", Id, UserName);
}
}

And I did not modify the controller and action。

Why this happened, and how to fix it?

Thanks.

Hi! I have two questions to ask:

  1. Is there a way to localize the error message for AbpAuthorizationException?
  2. Can the localization file "AbpWeb.xml" be overrided? and if so, how to do it?

Thanks first.

Showing 1 to 3 of 3 entries