简体   繁体   English

.Net Core 3.1 MVC 身份验证个人用户帐户和 ASP.NET 核心项目中的脚手架身份

[英].Net Core 3.1 MVC Authentication Individual User Accounts and Scaffold Identity in ASP.NET Core projects

Following this guide:遵循本指南:

Introduction to Identity on ASP.NET Core ASP.NET内核上的Identity介绍

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-3.1&tabs=visual-studio https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-3.1&tabs=visual-studio

Scaffold Identity in ASP.NET Core projects ASP.NET 核心项目中的脚手架标识

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-3.1&tabs=visual-studio https://docs.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-3.1&tabs=visual-studio

If I run the app, and click on the "Register" link from the navbar, it redirects to: https://localhost:44397/Identity/Account/Register but if I try to create a new account and register如果我运行该应用程序,然后单击导航栏中的“注册”链接,它会重定向到:https://localhost:44397/Identity/Account/Register 但如果我尝试创建一个新帐户并注册

I get This page isn't working If the problem continues, contact the site owner.我收到此页面无法正常工作 如果问题仍然存在,请联系网站所有者。 HTTP ERROR 400 The same applies to the Login page HTTP ERROR 400 同样适用于登录页面

Usually,the simplest steps to create a scaffolding project are as follows.通常,创建脚手架项目的最简单步骤如下。

1:Create a new project then change the Authentication: 1:创建一个新项目,然后更改身份验证: 在此处输入图像描述

2:Click the project Add and then click New Scaffolded Item. 2:单击项目添加,然后单击新建脚手架项目。 在此处输入图像描述

3:Chooes Identity then add: 3:选择身份然后添加: 在此处输入图像描述

4:Override all files and choose the context as ApplicationDbContext then add 4:覆盖所有文件并选择上下文作为ApplicationDbContext然后添加在此处输入图像描述

5:Migration and run project.Register first and then log in 5:迁移并运行项目。先注册再登录

im sorry cant find identity scaffolding item in project asp.net 6 mvc.Could show me how to setting(install) it in program.cs and data.cs?对不起,在项目 asp.net 6 mvc 中找不到标识脚手架项目。可以告诉我如何在 program.cs 和 data.cs 中设置(安装)它吗? Thanks谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 种子 ASP.NET .NET Core 3.1 中的身份用户和角色 - Seed ASP.NET Identity user and roles in .NET Core 3.1 个人用户帐户在ASP.Net MVC中不进行身份验证 - Individual User Accounts to No Authentication in ASP.Net MVC ASP.Net Core 3.1 中的个人用户设置 - Individual user settings in ASP.Net Core 3.1 注销并返回网址 | ASP.Net 核心标识 MVC | 验证 - Logout & ReturnUrl | ASP.Net Core Identity MVC | Authentication 有没有办法使用 Windows 身份验证注销并以其他用户身份登录? [ASP.NET Core 3.1 MVC] - Is there a way to sign out and login as another user using Windows authentication? [ASP.NET Core 3.1 MVC] ASP.NET MVC Core 3.1 中的自定义用户数据与 Azure AD 身份验证? - Custom User data in ASP.NET MVC Core 3.1 with Azure AD Authentication? 如何在 asp.net 核心标识的同一表中的两个单独用户帐户之间创建添加朋友功能 - How to create an Add Friend functionality between two individual user accounts in the same table in asp.net core identity Asp.Net核心和脚手架 - Asp.Net Core and Scaffold 带有 Identity Core 和 Asp.net Core 3.1 的多重登录页面 - Multiple Login Page with Identity Core and Asp.net Core 3.1 ASP.NET 核心 WebApi 身份验证 - ASP.NET Core WebApi Authentication with Identity
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM