From 9764af998a4c91196687b8d27693b935a243ab84 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 21 Mar 2024 14:54:11 +0000 Subject: Initial checkin following project regeneration to make post work --- Pages/Error.cshtml.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Pages/Error.cshtml.cs (limited to 'Pages/Error.cshtml.cs') diff --git a/Pages/Error.cshtml.cs b/Pages/Error.cshtml.cs new file mode 100644 index 0000000..c47665b --- /dev/null +++ b/Pages/Error.cshtml.cs @@ -0,0 +1,27 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace download_admin.Pages; + +[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] +[IgnoreAntiforgeryToken] +public class ErrorModel : PageModel +{ + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + private readonly ILogger _logger; + + public ErrorModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } +} + -- cgit v1.2.3