First time experimenting with creating an ASP.NET Core 8 web application in Visual Studio Code. I chose .NET 8 because it's the newest version. I am deploying it via Azure App Services. I am very familiar with Visual Studio and deploying to a regular web server, so I know the players.
First example: I created a simple one-page app in Visual Studio Code, deployed it through App Services, and I had to add home.html to the default documents, then my page showed up fine.
Second example: I used Visual Studio Code to create a simple ASP.NET Core web app (side note, doing this without needing full Visual Studio is pretty sweet, I have to admit).
.NET 8 places all the web pages in the Pages folder. Index.cshtml is my default page. I deploy to App Services, I get a page not found error.
- I added
Index.cshtmlto default documents. No luck. - I added
Pages\Index.cshtmlto default documents. No luck.
When I added a dummy index.html page and redeployed, it was able to see that page. But if I manually change the url to Pages/index.cshtml, I still get a page not found error.
I am used to having default.aspx in the root directory. What .NET did seems the new version of out of the box, creating a Pages folder, so what am I missing here?
UPDATE: I am very familiar with Visual Studio and ASP.NET from about five years ago. Maybe an easier question is, which template from .NET 8 should I select to have a "classic" ASP.NET site? Or is MVC my only option? Should I use ASP.NET 4.8 instead?





Web.configfile?which template from .NET 8 should I select to have a "classic" ASP.NET site? Or is MVC my only option? Should I use ASP.NET 4.8 instead?You are looking for .NET Core or ASP.Net App ?