I got a new asp.net core 3.0 site, added a folder, say Resource, to the Pages folder, and then a Index.cshtml under Resource folder. The hierarchy looks below:
When I run the site at http://localhost:50000, and add “/Resource” in the end of address, it says error 404. But the default pages: root Index, Error and Privacy are fine.
Member
1 Points
1 Post
newly added page is not accessible via url
Jan 21, 2019 03:38 AM|AnakinCN|LINK
Hi Pros,
I'm new to asp.net core.
I got a new asp.net core 3.0 site, added a folder, say Resource, to the Pages folder, and then a Index.cshtml under Resource folder. The hierarchy looks below:
Project
-Pages
-Resource
-Index.cshtml
-Index.cshtml
-Error.cshtml
-Privacy.cshtml
When I run the site at http://localhost:50000, and add “/Resource” in the end of address, it says error 404. But the default pages: root Index, Error and Privacy are fine.
Did I miss something to add a page?
Thank you.
All-Star
43240 Points
14958 Posts
Re: newly added page is not accessible via url
Jan 21, 2019 10:40 AM|PatriceSc|LINK
Hi,
You are using https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start?view=aspnetcore-2.2&tabs=visual-studio ?
See https://www.learnrazorpages.com/advanced/areas