Код: Выделить всё
MissingMethodException: Method not found: 'Boolean Microsoft.AspNetCore.Cryptography.UnsafeNativeMethods.CryptProtectData(Microsoft.AspNetCore.Cryptography.DATA_BLOB*, IntPtr, Microsoft.AspNetCore.Cryptography.DATA_BLOB*, IntPtr, IntPtr, UInt32, Microsoft.AspNetCore.Cryptography.DATA_BLOB ByRef)'.

Login.cshtml
Код: Выделить всё
Email
Mật Khẩu
Đăng Nhập
Код: Выделить всё
[HttpPost]
public async Task Login(string username, string password, string ReturnUrl)
{
if ((username == "[email protected]") && (password == "Admin"))
{
var claims = new List
{
new Claim(ClaimTypes.Name, username)
};
var claimsIdentity = new ClaimsIdentity(claims, "Login");
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(claimsIdentity));
return RedirectToAction("Index", "Home");
}
else
return View();
}
Подробнее здесь: https://stackoverflow.com/questions/759 ... e-cryptogr