mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
27 lines
647 B
C#
27 lines
647 B
C#
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Diagnostics;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||
|
using Microsoft.Extensions.Logging;
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|