Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Unable to AddPageRoute to the default page #6338

@hishamco

Description

@hishamco

Razor Page by default looking for index.cshtml, using AddPageRoute i'm not able to route to home.cshtml using:

services.AddMvc()
     .AddRazorPagesOptions(options =>
     {
          options.RootDirectory = "/Pages";
          options.AddPageRoute("/Home.cshtml", "/");
     });

Perhaps someone may ask why we need to home pages?
1- Assume I don't have index.cshtml at all
2- Look at CH9 as example, whenever a live event streaming, a new home page shows up instead of the default one

@pranavkm any idea why this not work as expected?!!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions