diff --git a/CS/GetStartedWithTreeList/Components/App.razor b/CS/GetStartedWithTreeList/Components/App.razor index 0d6d900..ef899fc 100644 --- a/CS/GetStartedWithTreeList/Components/App.razor +++ b/CS/GetStartedWithTreeList/Components/App.razor @@ -2,25 +2,28 @@ @inject IFileVersionProvider FileVersionProvider - +
+ Request ID: @RequestId
+
+ Swapping to Development environment will display more detailed information about the error that occurred. +
++ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +
+ +@code{ + [CascadingParameter] + private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; +} diff --git a/CS/GetStartedWithTreeList/Components/Pages/Index.razor b/CS/GetStartedWithTreeList/Components/Pages/Index.razor deleted file mode 100644 index 608d5c7..0000000 --- a/CS/GetStartedWithTreeList/Components/Pages/Index.razor +++ /dev/null @@ -1,56 +0,0 @@ -@page "/" -@using GetStartedWithTreeList.Services -@attribute [StreamRendering(true)] -@rendermode InteractiveServer -@inject EmployeeTaskService TaskService - -Sorry, there's nothing at this address.
+