Configure Microsoft.AspNet.Identity to allow email address as username

前端 未结 13 2054
时光取名叫无心
时光取名叫无心 2020-11-28 20:08

I\'m in the process of creating a new application and started out using EF6-rc1, Microsoft.AspNet.Identity.Core 1.0.0-rc1, Microsoft.AspNet.Identity.EntityFramework 1.0.0-rc

13条回答
  •  误落风尘
    2020-11-28 20:34

    In my case, running in VS 2013 C#, MVC 5.2.2, using ASP.NET Identity 2.0, the solution was to update the ApplicationUserManager constructor inside App_Start\IdentityConfig.cs like so:

    public ApplicationUserManager(IUserStore store)
            : base(store)
        {
            this.UserValidator = new UserValidator(this) { AllowOnlyAlphanumericUserNames = false };
        }
    

提交回复
热议问题