我正在学习Asp.net CoreMVC2.0,不知道如何访问登录用户的属性。
为了举例说明,让我们使用生成的Asp.net CoreMVC2.0的默认模板,其中选择了Individual User Account。
模板为我们提供了一个从IdentityUser继承的空IdentityUser。同样,为了简单起见,我只将一个属性Point添加到ApplicationUser中,如下所示。
public class ApplicationUser : IdentityUser
{
public int Point { get; set; }
}
Point将跟踪登录用户访问"/
我正在使用ASP.Net CoreMVC3.1开发一个应用程序,我面临的问题是它无法登录。本地主机响应401未经授权
AccountController
[HttpPost]
public async Task<IActionResult> Login(PixClient client)
{
var claims = new List<Claim>();
claims.Add(new Claim(ClaimTypes.Email, client.Email));
va
我不知道为什么每次在ASP.NET CoreMVC3.1中都会出现这个错误。我有一个风景,它在它的位置。我只在一些地方发现了这个错误。
InvalidOperationException: The view 'Dashboard' was not found. The following locations were searched:
/Areas/Admin/Views/Home/Dashboard.cshtml
/Areas/Admin/Views/Shared/Dashboard.cshtml
/Views/Shared/Dashboard.c