Click here to Skip to main content
15,896,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
As a learning exercise, I'm experimenting with .Net Core 3.0 MVC and I wanted to use pages, but I can't figure out what middleware I would need to serve Razor Pages from the Pages folder. (I'll also be adding Bootstrap and an API but that's another story.) I do that a lot in an Intranet app I have. It seems funny, but it seems that .Net Core is moving away from MVC and back to Pages. Welcome to 2010. It works for me.

What I have tried:

I tried app.UseHttpsRedirection() and app.UseMvc(). I have app.UseStaticFiles() for the statis files in wwwroot. I have app.UseMvcWithDefaultRoute(); for the MVC stuff.
Posted
Updated 28-Oct-19 5:03am

1 solution

Maybe this information will be useful:
Quote:
Razor views, pages, controllers, page models, Razor components, View components, and data models can be built into a Razor class library (RCL). The RCL can be packaged and reused.

Reusable Razor UI in class libraries with ASP.NET Core | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900