2018-05-22 10:11:50 +02:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Microsoft.AspNetCore.Diagnostics;
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
namespace Monitor.Pages
|
|
|
|
{
|
|
|
|
public class ErrorModel : PageModel
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
public string RequestId { get; set; }
|
|
|
|
public IExceptionHandlerFeature Exception = null;
|
|
|
|
|
|
|
|
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
public void OnGet()
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
Exception = HttpContext.Features.Get<IExceptionHandlerFeature>();
|
|
|
|
|
|
|
|
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|