Files
KAJE_ciditest/NotImportant/KAJE_cont1/Pages/Error.cshtml.cs
T
Karsten Jeppesen e4b11d02a4
CICD-S251/KAJE_ciditest/pipeline/head This commit looks good
Test
Mere test
2026-11-03 13:08:38 +01:00

22 lines
549 B
C#

using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;
namespace KAJE_cont1.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);
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}