forked from TOPLIB-SYS-N961884/ENTERPRISE-ENROLLMENT-POLICY-STAT-9847867600480257948786510326576488684798503.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathError.cshtml.cs
26 lines (21 loc) · 732 Bytes
/
Error.cshtml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;
namespace _Cloud_Identity_Program._GERARÐ_LICHE_.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel
{
private readonly ILogger<ErrorModel> _logger;
public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}
public string? RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}