[英].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. 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.
wwwroot/wwwroot 中有一些脚本和 CSS 文件。
What am I missing?我错过了什么? I'm new to C#.NET, so it's probably something fundamental, but I haven't found an answer yet.
我是 C#.NET 的新手,所以这可能是一些基本的东西,但我还没有找到答案。
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
.如果您的 web 应用程序运行成功,请不要介意
wwwroot
中的内容。 If not, make sure your project could run successfully local, then deploy follow this tutorial: Quickstart: Deploy an ASP.NET web app如果没有,请确保您的项目可以在本地成功运行,然后按照本教程进行部署: 快速入门:部署 ASP.NET web 应用程序
It turns out that the web app will 404 on lots of types of errors, in this case a problem connecting to the database.事实证明,web 应用程序会在很多类型的错误上出现 404,在这种情况下是连接到数据库的问题。 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.
我能够使用诊断工具和应用程序错误日志来解决这个问题,因此建议其他任何有无法解释的 404 的人检查日志。 Pretty basic stuff, but as I said this is all new to me.
非常基本的东西,但正如我所说,这对我来说是全新的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.