diff --git a/samples/IdentitySample.Mvc/Controllers/AccountController.cs b/samples/IdentitySample.Mvc/Controllers/AccountController.cs index 99afb7d0e1..8d556f53c3 100644 --- a/samples/IdentitySample.Mvc/Controllers/AccountController.cs +++ b/samples/IdentitySample.Mvc/Controllers/AccountController.cs @@ -91,7 +91,7 @@ namespace IdentitySample.Controllers if (result.Succeeded) { var code = await UserManager.GenerateEmailConfirmationTokenAsync(user); - var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Context.Request.Scheme); + var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme); await MessageServices.SendEmailAsync(model.Email, "Confirm your account", "Please confirm your account by clicking this link: link"); ViewBag.Link = callbackUrl; @@ -250,7 +250,7 @@ namespace IdentitySample.Controllers } var code = await UserManager.GeneratePasswordResetTokenAsync(user); - var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: Context.Request.Scheme); + var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme); await MessageServices.SendEmailAsync(model.Email, "Reset Password", "Please reset your password by clicking here: link"); ViewBag.Link = callbackUrl; @@ -424,7 +424,7 @@ namespace IdentitySample.Controllers private async Task GetCurrentUserAsync() { - return await UserManager.FindByIdAsync(Context.User.GetUserId()); + return await UserManager.FindByIdAsync(HttpContext.User.GetUserId()); } private IActionResult RedirectToLocal(string returnUrl) diff --git a/samples/IdentitySample.Mvc/Controllers/ManageController.cs b/samples/IdentitySample.Mvc/Controllers/ManageController.cs index 58f53c386a..fe62b54956 100644 --- a/samples/IdentitySample.Mvc/Controllers/ManageController.cs +++ b/samples/IdentitySample.Mvc/Controllers/ManageController.cs @@ -370,7 +370,7 @@ namespace IdentitySample.Controllers private async Task GetCurrentUserAsync() { - return await UserManager.FindByIdAsync(Context.User.GetUserId()); + return await UserManager.FindByIdAsync(HttpContext.User.GetUserId()); } private IActionResult RedirectToLocal(string returnUrl)