Merge pull request #12139 from isaac2004/11243-worrk
Added Error page to ServerSide Blazor (#11243)
This commit is contained in:
commit
cf3c2ba02b
|
|
@ -0,0 +1,16 @@
|
|||
@page "/error"
|
||||
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
|
|
@ -144,7 +144,7 @@ namespace BlazorServerWeb_CSharp
|
|||
}
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
app.UseExceptionHandler("/Error");
|
||||
#if (RequiresHttps)
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
|
|
|
|||
|
|
@ -902,6 +902,7 @@
|
|||
"Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs",
|
||||
"Data/Migrations/ApplicationDbContextModelSnapshot.cs",
|
||||
"Pages/Counter.razor",
|
||||
"Pages/Error.razor",
|
||||
"Pages/FetchData.razor",
|
||||
"Pages/Index.razor",
|
||||
"Pages/_Host.cshtml",
|
||||
|
|
@ -938,6 +939,7 @@
|
|||
"Data/WeatherForecast.cs",
|
||||
"Data/WeatherForecastService.cs",
|
||||
"Pages/Counter.razor",
|
||||
"Pages/Error.razor",
|
||||
"Pages/FetchData.razor",
|
||||
"Pages/Index.razor",
|
||||
"Pages/_Host.cshtml",
|
||||
|
|
@ -974,6 +976,7 @@
|
|||
"Data/WeatherForecast.cs",
|
||||
"Data/WeatherForecastService.cs",
|
||||
"Pages/Counter.razor",
|
||||
"Pages/Error.razor",
|
||||
"Pages/FetchData.razor",
|
||||
"Pages/Index.razor",
|
||||
"Pages/_Host.cshtml",
|
||||
|
|
@ -1009,6 +1012,7 @@
|
|||
"_Imports.razor",
|
||||
"Data/WeatherForecast.cs",
|
||||
"Data/WeatherForecastService.cs",
|
||||
"Pages/Error.razor",
|
||||
"Pages/Counter.razor",
|
||||
"Pages/FetchData.razor",
|
||||
"Pages/Index.razor",
|
||||
|
|
@ -1045,6 +1049,7 @@
|
|||
"Data/WeatherForecast.cs",
|
||||
"Data/WeatherForecastService.cs",
|
||||
"Pages/Counter.razor",
|
||||
"Pages/Error.razor",
|
||||
"Pages/FetchData.razor",
|
||||
"Pages/Index.razor",
|
||||
"Pages/_Host.cshtml",
|
||||
|
|
@ -1081,6 +1086,7 @@
|
|||
"Data/WeatherForecast.cs",
|
||||
"Data/WeatherForecastService.cs",
|
||||
"Pages/Counter.razor",
|
||||
"Pages/Error.razor",
|
||||
"Pages/FetchData.razor",
|
||||
"Pages/Index.razor",
|
||||
"Pages/_Host.cshtml",
|
||||
|
|
|
|||
Loading…
Reference in New Issue