mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
22 lines
514 B
C#
22 lines
514 B
C#
|
using System.Diagnostics;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||
|
|
||
|
namespace Example.ASP.Pages
|
||
|
{
|
||
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||
|
public class ErrorModel : PageModel
|
||
|
{
|
||
|
public string RequestId { get; set; }
|
||
|
|
||
|
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||
|
|
||
|
public ErrorModel() { }
|
||
|
|
||
|
public void OnGet()
|
||
|
{
|
||
|
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
|
||
|
}
|
||
|
}
|
||
|
}
|