Hello, How Could I create Authorization in Asp.Net MVC5 WebApi without E-mail Confirmation? RRS feed

  • Question

  • User-1104521819 posted

    I used the Template "Indiviual Login" When Create a Asp.Net MVC Webapi Project, Finding that E-mail confirmation cannot be removed. However I do not want this function in my practice. Must I override the Class "ApplicationUser"? But that method seems not enough. frown

    Wednesday, March 7, 2018 2:03 PM

All replies

  • User409696431 posted

    Please let us know: what version of VS, what type of project, and what type of authentication you used to create the project.   Why do you think you can't remove the email confirmation?  Without knowing exactly what code you are discussing it's hard to answer you.

    Wednesday, March 7, 2018 9:28 PM
  • User-1104521819 posted

    Thank you very much for answering me! The situation of mine is as follow:

    I use Visual Studio Community 2017;

    I build project of Asp.net MVC and WebApi;

    I choose the authentication of "Individual user  Accounts";

    I finded e-mail confirmation module is contained in the system class "IdentityUser", and with this the database will automatically be built with e-mail account.

    Thursday, March 8, 2018 2:27 AM
  • User409696431 posted

    You can comment out the code in the AccountController.cs that sends the email confirmation request in the Register action.  Users will then be registered without being sent a confirmation link email.  (In fact, I think the code is commented out by default, and you would have to uncomment it to enable email verification.)

    Thursday, March 8, 2018 5:23 AM