简体   繁体   English

.NET web 应用发布到 Azure 没有页面

[英].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.

相关问题 发布到 Azure 的 Asp.Net 应用仅显示“您的应用服务应用已创建” - Asp.Net App published to Azure only shows “Your App Service app has been created” 在Azure Web应用中发布出现服务器错误 - Published in Azure web app appears a server error 如何将已发布的Web应用程序从Azure导入到Visual Studio for Web - How to import a published Web app from azure to visual studio for web 为什么我可以在本地运行来自 a.Net Core 3.1 web 应用程序的外部 HTTP 调用,但在发布到 Azure 网站时不能运行? - Why can I run external HTTP calls from a .Net Core 3.1 web app locally, but not when published to Azure Websites? 从VS发布时,Azure中的代码是否会更改为Web应用程序机器人? - Will the code in Azure change for the web app bot when published from VS? 发布的asp.net Web应用程序和发布的wcf服务无法在IIS中连接 - published asp.net web app and published wcf service not connectiing in IIS 默认标识页面显示在 Azure 发布的站点上 - Default identity pages is displayed on Azure published site ASP.NET Core-发布应用程序时找不到具有[Authorize]属性的页面 - ASP.NET Core - Pages with `[Authorize]` attribute cannot be found when app is published 使用ASP.NET Core 2.1将静态文件发布到Azure后无法加载 - Unable to load static file once it has been published to Azure, using ASP.NET Core 2.1 从ASP.NET Web API上载带有帖子的文件上传到Azure而不是localhost时引发错误 - Uploading file with post from ASP.NET web api throws error when published to Azure but not localhost
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM