= null) { <a asp-controller="Manage" asp-action="AddPhoneNumber">Change @ : | <a asp-controller="Manage" asp-action="RemovePhoneNumber">Remove 禁用账户来防止暴力破解 我们推荐你应用双重验证时使用账户禁用,一旦用户执行登录,每次失败的尝试将会被记录,一旦到达设置的错误次数(默认是五次),当前账户将会倍禁用5分钟,以下的配置将在用户登录失败十次后禁用账户 10分钟: services.Configure<IdentityOptions>(options => { options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes (10); options.Lockout.MaxFailedAccessAttempts = 10; }); 原文地址:http://docs.asp.net/en/latest/security