0

I am using Asp.Net Webforms application. I used Microsoft.AspNet.Identity for authentication. I want use user's email address as username. But it doesn't let. can you help me please?

1 Answers1

5

Probably the problem is the use of non-alphanumeric characters in username. If so use this

UserManager.UserValidator = new UserValidator<TUser>(UserManager) { 
                                      AllowOnlyAlphanumericUserNames = false }
Christian Phillips
  • 18,399
  • 8
  • 53
  • 82
Hessam
  • 1,377
  • 1
  • 23
  • 45