Files
karsten.jeppesen/Test0929a/Test0929a/Pages/Error.cshtml.cs
T
Karsten Jeppesen 2ff459c147
CICD-UCN/karsten.jeppesen/pipeline/head There was a failure building this commit
wip
2026-09-29 07:38:12 +02:00

22 lines
548 B
C#

using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;
namespace Test0929a.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;
}
}
}