简体   繁体   中英

.NET web app published to Azure has no pages

After publishing a web app without errors from Visual Studio 2019 to an Azure web app, the website 404s and I can see in the console that there are only DLLs and an EXE in wwwroot - no aspx or html files. There are some scripts and CSS files in wwwroot/wwwroot.

What am I missing? I'm new to C#.NET, so it's probably something fundamental, but I haven't found an answer yet.

What would be deployed depends on your project's file structure. 在此处输入图像描述 If your web app runs successfully, don't mind about the content in wwwroot . If not, make sure your project could run successfully local, then deploy follow this tutorial: Quickstart: Deploy an ASP.NET web app

It turns out that the web app will 404 on lots of types of errors, in this case a problem connecting to the database. I was able to figure it out using Diagnostic Tools and the application error logs, so would recommend anyone else having unexplained 404s to check the logs. Pretty basic stuff, but as I said this is all new to me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM