Skip to content

Commit 5a9a985

Browse files
authored
[Blazor] Switches Error.razor to Error.cshtml (#22777)
* [Blazor] Switch to use a cshtml file for errors * Update template tests
1 parent 9d70185 commit 5a9a985

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
@page "/error"
2-
3-
4-
<h1 class="text-danger">Error.</h1>
5-
<h2 class="text-danger">An error occurred while processing your request.</h2>
6-
7-
<h3>Development Mode</h3>
8-
<p>
9-
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
10-
</p>
11-
<p>
12-
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
13-
It can result in displaying sensitive information from exceptions to end users.
14-
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
15-
and restarting the app.
16-
</p>
1+
@page
2+
3+
4+
<h1 class="text-danger">Error.</h1>
5+
<h2 class="text-danger">An error occurred while processing your request.</h2>
6+
7+
<h3>Development Mode</h3>
8+
<p>
9+
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
10+
</p>
11+
<p>
12+
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
13+
It can result in displaying sensitive information from exceptions to end users.
14+
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
15+
and restarting the app.
16+
</p>

src/ProjectTemplates/test/template-baselines.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@
914914
"Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs",
915915
"Data/Migrations/ApplicationDbContextModelSnapshot.cs",
916916
"Pages/Counter.razor",
917-
"Pages/Error.razor",
917+
"Pages/Error.cshtml",
918918
"Pages/FetchData.razor",
919919
"Pages/Index.razor",
920920
"Pages/_Host.cshtml",
@@ -951,7 +951,7 @@
951951
"Data/WeatherForecast.cs",
952952
"Data/WeatherForecastService.cs",
953953
"Pages/Counter.razor",
954-
"Pages/Error.razor",
954+
"Pages/Error.cshtml",
955955
"Pages/FetchData.razor",
956956
"Pages/Index.razor",
957957
"Pages/_Host.cshtml",
@@ -988,7 +988,7 @@
988988
"Data/WeatherForecast.cs",
989989
"Data/WeatherForecastService.cs",
990990
"Pages/Counter.razor",
991-
"Pages/Error.razor",
991+
"Pages/Error.cshtml",
992992
"Pages/FetchData.razor",
993993
"Pages/Index.razor",
994994
"Pages/_Host.cshtml",
@@ -1024,7 +1024,7 @@
10241024
"_Imports.razor",
10251025
"Data/WeatherForecast.cs",
10261026
"Data/WeatherForecastService.cs",
1027-
"Pages/Error.razor",
1027+
"Pages/Error.cshtml",
10281028
"Pages/Counter.razor",
10291029
"Pages/FetchData.razor",
10301030
"Pages/Index.razor",
@@ -1061,7 +1061,7 @@
10611061
"Data/WeatherForecast.cs",
10621062
"Data/WeatherForecastService.cs",
10631063
"Pages/Counter.razor",
1064-
"Pages/Error.razor",
1064+
"Pages/Error.cshtml",
10651065
"Pages/FetchData.razor",
10661066
"Pages/Index.razor",
10671067
"Pages/_Host.cshtml",
@@ -1098,7 +1098,7 @@
10981098
"Data/WeatherForecast.cs",
10991099
"Data/WeatherForecastService.cs",
11001100
"Pages/Counter.razor",
1101-
"Pages/Error.razor",
1101+
"Pages/Error.cshtml",
11021102
"Pages/FetchData.razor",
11031103
"Pages/Index.razor",
11041104
"Pages/_Host.cshtml",

0 commit comments

Comments
 (0)