13 | Request ID: @Model.RequestId
14 |
15 | HTTP TraceId: @Model.TraceId
16 |
17 | Activity.Id: @Model.CurrentActivity?.Id
18 |
19 | Activity.SpanId: @Model.CurrentActivity?.SpanId
20 |
21 | Activity.TraceId: @Model.CurrentActivity?.TraceId
22 |
23 | Activity.Parent: @Model.CurrentActivity?.Parent
24 |
25 | Activity.ParentId: @Model.CurrentActivity?.ParentId
26 |
27 | Activity.ParentSpanId: @Model.CurrentActivity?.ParentSpanId
28 |
29 | Activity.RootId: @Model.CurrentActivity?.RootId
30 |
31 | Activity.Kind: @Model.CurrentActivity?.Kind
32 |
37 | Swapping to the Development environment displays detailed information about the error that occurred. 38 |
39 |40 | The Development environment shouldn't be enabled for deployed applications. 41 | It can result in displaying sensitive information from exceptions to end users. 42 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 43 | and restarting the app. 44 |
*@ 45 | -------------------------------------------------------------------------------- /CarvedRock.WebApp/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | using Microsoft.AspNetCore.Authorization; 5 | 6 | namespace CarvedRock.WebApp.Pages 7 | { 8 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 9 | [IgnoreAntiforgeryToken] 10 | [AllowAnonymous] 11 | public class ErrorModel : PageModel 12 | { 13 | public string? RequestId { get; set; } 14 | public Activity? CurrentActivity { get; set; } 15 | public string? TraceId { get; set; } 16 | 17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 18 | 19 | private readonly ILoggerTHROUGHOUT THE SEASON
11 |Name | 11 |Description | 12 |Price | 13 |
---|---|---|
19 | 21 | @Html.DisplayFor(modelItem => product.Name) 22 | |
23 | 24 | @Html.DisplayFor(modelItem => product.Description) 25 | | 26 |27 | @Html.DisplayFor(modelItem => product.Price) 28 | | 29 |