Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is ManageController.cs in ASP.NET-MVC 5.1 and why it was created? It haven't been created by MVC's 5.1 template before

In June I started ASP.NET-MVC 5.1 project. I finished it in October and now I wanted to start a new one. Same version of ASP.NET-MVC. I selected new project->....->MVC with Individual Accounts exactly like before.

Just at the start I noticed in Controller directory 3 controllers(not 2 as few months ago): AccountController, HomeController and ManageController and in Views ManageViewModels.

What is ManageController?

Why it appeared despite I write new application in exacly the same version of MVC as before?

Can I force Visual Studio 2013 to use the previous template?(I am not sure if I want that but asking in case I do)

Old(plus mine additional controllers):

enter image description here

New:

enter image description here

like image 323
Yoda Avatar asked Feb 11 '23 09:02

Yoda


2 Answers

When Visual Studio 2013 was first released, it was released with ASP.NET Identity 1.0, and the default template included the two controllers you mention.

At some point, I think Update 2, they upgraded the version of ASP.NET Identity that comes with Visual studio to 2.0, and in Update 3 they upgraded this to 2.1. Identity 2.1 comes with the new Sign-in manager, which you can read about here:

http://blogs.msdn.com/b/webdev/archive/2014/08/05/announcing-rtm-of-asp-net-identity-2-1-0.aspx

ManageController deals with this signin manager, and was added to the default template.

like image 141
Erik Funkenbusch Avatar answered Feb 13 '23 23:02

Erik Funkenbusch


ManageController is for an authenticated user to manage her account. If you visit this link:

http://www.asp.net/identity/overview/features-api/two-factor-authentication-using-sms-and-email-with-aspnet-identity

you'll find screenshots on how it works.

like image 35
Danilo Cataldo Avatar answered Feb 14 '23 00:02

Danilo Cataldo