Skip to content

Commit 3cf8b5c

Browse files
authored
Add IgnoreAntiforgeryToken to Error Page
Fixes #23759
1 parent 6ec9940 commit 3cf8b5c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Pages/Error.cshtml.cs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace ComponentsWebAssembly_CSharp.Server.Pages
1111
{
1212
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
13+
[IgnoreAntiforgeryToken]
1314
public class ErrorModel : PageModel
1415
{
1516
public string RequestId { get; set; }

src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Error.cshtml.cs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Company.WebApplication1.Pages
1111
{
1212
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
13+
[IgnoreAntiforgeryToken]
1314
public class ErrorModel : PageModel
1415
{
1516
public string RequestId { get; set; }

0 commit comments

Comments
 (0)