diff --git a/src/UI/Areas/Identity/Pages/Error.cshtml.cs b/src/UI/Areas/Identity/Pages/Error.cshtml.cs index 4be543c0b8..ee582fc37d 100644 --- a/src/UI/Areas/Identity/Pages/Error.cshtml.cs +++ b/src/UI/Areas/Identity/Pages/Error.cshtml.cs @@ -9,13 +9,13 @@ using Microsoft.AspNetCore.Mvc.RazorPages; namespace Microsoft.AspNetCore.Identity.UI.Pages { [AllowAnonymous] + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public class ErrorModel : PageModel { public string RequestId { get; set; } public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; diff --git a/test/WebSites/Identity.DefaultUI.WebSite/Pages/Error.cshtml.cs b/test/WebSites/Identity.DefaultUI.WebSite/Pages/Error.cshtml.cs index ee00a7c0e1..34dc6b3333 100644 --- a/test/WebSites/Identity.DefaultUI.WebSite/Pages/Error.cshtml.cs +++ b/test/WebSites/Identity.DefaultUI.WebSite/Pages/Error.cshtml.cs @@ -7,13 +7,13 @@ using Microsoft.AspNetCore.Mvc.RazorPages; namespace Identity.DefaultUI.WebSite.Pages { + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public class ErrorModel : PageModel { public string RequestId { get; set; } public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;