2019-05-11 23:23:27 +02:00
|
|
|
using System.Diagnostics;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
|
2020-12-21 20:42:29 +01:00
|
|
|
namespace webmusic.Pages {
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
|
|
public class ErrorModel : PageModel {
|
|
|
|
public string RequestId { get; set; }
|
2019-05-11 23:23:27 +02:00
|
|
|
|
2020-12-21 20:42:29 +01:00
|
|
|
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
2019-05-11 23:23:27 +02:00
|
|
|
|
2020-12-21 20:42:29 +01:00
|
|
|
public void OnGet() {
|
|
|
|
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
|
|
|
|
}
|
|
|
|
}
|
2019-05-11 23:23:27 +02:00
|
|
|
}
|