Skip to content

Commit 3224a77

Browse files
Lee DumondLee Dumond
authored andcommitted
add missing Error view
1 parent cd662d9 commit 3224a77

2 files changed

Lines changed: 40 additions & 6 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
@{
3+
Layout = null;
4+
}
5+
6+
<!DOCTYPE html>
7+
8+
<html>
9+
<head>
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11+
<title>Error</title>
12+
13+
<environment names="Development">
14+
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
15+
<link rel="stylesheet" href="~/css/site.min.css" type="text/css" />
16+
17+
</environment>
18+
<environment names="Staging,Production">
19+
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
20+
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
21+
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
22+
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
23+
</environment>
24+
</head>
25+
<body>
26+
<div class="container">
27+
<h1 class="text-danger">Error.</h1>
28+
<h2 class="text-danger">An error occurred while processing your request.</h2>
29+
30+
<h3>Development Mode</h3>
31+
32+
<p>
33+
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
34+
</p>
35+
<p>
36+
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
37+
</p>
38+
</div>
39+
</body>
40+
</html>

src/Web/WebStatus/WebStatus.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
55
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
66
</PropertyGroup>
7-
<ItemGroup>
8-
<Compile Remove="Views\**" />
9-
<Content Remove="Views\**" />
10-
<EmbeddedResource Remove="Views\**" />
11-
<None Remove="Views\**" />
12-
</ItemGroup>
137
<ItemGroup>
148
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="2.2.22" />
159
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="2.2.3" />

0 commit comments

Comments
 (0)