When I publish my website in the public.html
folder the website doesn't open. I get a "forbidden" error. Is it because the project is published with .cshtml
extensions? Or is it something else.
My website doesn't have an index page, I changed the startup in Visual Studio so it opens the Home.cshtml
page as the standard page. I use Visual Studio 2022 and ASP.NET, not Visual Studio Code. But I use VS Code to upload the website to the FTP server. this is what the project looks like: project and this is what the host server structure looks like: host server
When I change the .cshtml
to html, the server is able to read the file and then it works but not all the pages work for example: the layout html in the shared folder doesn't work. Also I don't think it's logic you have to change the extensions to .html
instead of .cshtml
. When I started my project in Visual Studio, everything worked fine.