-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20687 from abpframework/AbpCompilationRazorPageBase
Use razor page to return error pages.
- Loading branch information
Showing
15 changed files
with
793 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
...enancy/Volo/Abp/AspNetCore/MultiTenancy/Views/MultiTenancyMiddlewareErrorPage.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...ultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/Views/MultiTenancyMiddlewareErrorPage.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@using System.Globalization | ||
@using Volo.Abp.AspNetCore.MultiTenancy.Views | ||
@using Volo.Abp.AspNetCore.RazorViews | ||
@inherits AbpCompilationRazorPageBase | ||
@{ | ||
Response.ContentType = "text/html; charset=utf-8"; | ||
Response.StatusCode = 404; | ||
} | ||
|
||
@functions{ | ||
public MultiTenancyMiddlewareErrorPage(MultiTenancyMiddlewareErrorPageModel model) | ||
{ | ||
Model = model; | ||
} | ||
|
||
public MultiTenancyMiddlewareErrorPageModel Model { get; set; } | ||
} | ||
|
||
<html lang="@HtmlEncoder.Encode(CultureInfo.CurrentCulture.Name)"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>@HtmlEncoder.Encode(Model.Message)</title> | ||
</head> | ||
<body> | ||
<h3>@HtmlEncoder.Encode(Model.Message)</h3> | ||
<p>@HtmlEncoder.Encode(Model.Details)<p/> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
...ltiTenancy/Volo/Abp/AspNetCore/MultiTenancy/Views/MultiTenancyMiddlewareErrorPageModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Volo.Abp.AspNetCore.MultiTenancy.Views; | ||
|
||
public class MultiTenancyMiddlewareErrorPageModel | ||
{ | ||
public string Message { get; set; } | ||
|
||
public string Details { get; set; } | ||
|
||
public MultiTenancyMiddlewareErrorPageModel(string message, string details) | ||
{ | ||
Message = message; | ||
Details = details; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
.../src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
...ework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Libs/AbpMvcLibsErrorPage.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@using Volo.Abp.AspNetCore.RazorViews | ||
@inherits AbpCompilationRazorPageBase | ||
@{ | ||
Response.ContentType = "text/html; charset=utf-8"; | ||
Response.StatusCode = 500; | ||
} | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Error - The Libs folder is missing!</title> | ||
</head> | ||
<body> | ||
<h1> ⚠️ The Libs folder under the <code style="background-color: #e7e7e7;">wwwroot/libs</code> directory is empty!</h1> | ||
|
||
<p>The Libs folder contains mandatory NPM Packages for running the project.</p> | ||
|
||
<p>Make sure you run the <code style="background-color: #e7e7e7;">abp install-libs</code> CLI tool command.</p> | ||
|
||
<p>For more information, check out the <a href="https://abp.io/docs/latest/CLI#install-libs">ABP CLI documentation</a></p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.