Skip to content

Commit 6095d4b

Browse files
committed
#18 Add razor pages support for error view
1 parent 9af910d commit 6095d4b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ Special thanks to everyone who helped and contributed to this project!
117117

118118
* [@jdebarochez](https://github.com/jdebarochez)
119119
* [@arisliang](https://github.com/arisliang)
120+
* [@dotnetshadow](https://github.com/dotnetshadow)
120121

121122
---
122123

Startup.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public void ConfigureServices(IServiceCollection services)
2222
{
2323
services.AddControllersWithViews();
2424

25+
// Add AddRazorPages if the app uses Razor Pages.
26+
services.AddRazorPages();
27+
2528
// In production, the Vue files will be served from this directory
2629
services.AddSpaStaticFiles(configuration =>
2730
{
@@ -60,6 +63,9 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
6063
new SpaOptions { SourcePath = "ClientApp" },
6164
npmScript: (System.Diagnostics.Debugger.IsAttached) ? "serve" : null,
6265
regex: "Compiled successfully");
66+
67+
// Add MapRazorPages if the app uses Razor Pages. Since Endpoint Routing includes support for many frameworks, adding Razor Pages is now opt -in.
68+
endpoints.MapRazorPages();
6369
});
6470
}
6571
}

0 commit comments

Comments
 (0)