Skip to content

Commit

Permalink
#18 Add razor pages support for error view
Browse files Browse the repository at this point in the history
  • Loading branch information
liborpansky committed Oct 16, 2019
1 parent 9af910d commit 6095d4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Special thanks to everyone who helped and contributed to this project!

* [@jdebarochez](https://github.com/jdebarochez)
* [@arisliang](https://github.com/arisliang)
* [@dotnetshadow](https://github.com/dotnetshadow)

---

Expand Down
6 changes: 6 additions & 0 deletions Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();

// Add AddRazorPages if the app uses Razor Pages.
services.AddRazorPages();

// In production, the Vue files will be served from this directory
services.AddSpaStaticFiles(configuration =>
{
Expand Down Expand Up @@ -60,6 +63,9 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
new SpaOptions { SourcePath = "ClientApp" },
npmScript: (System.Diagnostics.Debugger.IsAttached) ? "serve" : null,
regex: "Compiled successfully");

// Add MapRazorPages if the app uses Razor Pages. Since Endpoint Routing includes support for many frameworks, adding Razor Pages is now opt -in.
endpoints.MapRazorPages();
});
}
}
Expand Down

0 comments on commit 6095d4b

Please sign in to comment.