V
V
Victor P.2018-07-15 18:29:55
ASP.NET
Victor P., 2018-07-15 18:29:55

Where to read what has changed in asp.net core 2.1?

Good evening!
With every update of .net, it's like I'm starting to learn all this infrastructure all over again. Downloaded the latest sdk for .net core 2.1, created an mvc project, wanted to change the minimum password length, remove numbers... and just couldn't find it in the project. Previously, I just went to f12 by IdentityUser and set what I needed. Now I climb into the tutorials and advise this

services.AddIdentity<ApplicationUser, IdentityRole>()
    .AddEntityFrameworkStores<ApplicationDbContext>()
    .AddDefaultTokenProviders();

change to this:
services.AddIdentity<ApplicationUser, IdentityRole>(opts=> {
        opts.Password.RequiredLength = 5;   // минимальная длина
        opts.Password.RequireNonAlphanumeric = false;   // требуются ли не алфавитно-цифровые символы
        opts.Password.RequireLowercase = false; // требуются ли символы в нижнем регистре
        opts.Password.RequireUppercase = false; // требуются ли символы в верхнем регистре
        opts.Password.RequireDigit = false; // требуются ли цифры
    })
    .AddEntityFrameworkStores<ApplicationDbContext>()
    .AddDefaultTokenProviders();

The problem is that it doesn't even exist. Moreover, I didn’t find AccountController in the project at all :) That is, by default, if you choose “store accounts of created users in the application” when creating a project or something like that, then a user registration binding is created. Now it goes to the address
https://localhost:44300/Identity/Account/Register
I understand that all this happens in the Startup.cs file, all this Identity is connected there. But where it comes from, I don't understand. Tutorials are already outdated ) I understand that some smart people add new mechanics in each update, that is, it should become easier/better/faster/clearer. But what guides them? How to work with it? The most important question is, who writes these first manuals, how are they understood?
Previously, I created an empty database, changed the connection string, and when creating a new user through the website, all the necessary tables were created in my database, then I added my own and worked without bothering. Now I don’t understand how a new project works, when creating the first user I get an error 500 and I don’t even understand where to go to look, since the controller is missing.
ps error SqlException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
I do not use windows authentication, I connected to an empty database with a login / password from the DefaultConnection

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
#, 2018-07-15
@mindtester

1 - https://blogs.msdn.microsoft.com/webdev/2018/05/30...
2 - https://docs.microsoft.com/en-us/aspnet/core/relea...
in Russian
3 - andrey.moveax.ru/post/news-2018-05-31-dot-net-core
...

D
Dmitry, 2018-07-15
@fgon

What's new in ASP.NET Core 2.1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question