gpt4 book ai didi

c# - 如何访问直接放在kudu home/site/wwwroot中的html页面?

转载 作者:行者123 更新时间:2023-12-03 01:21:45 24 4
gpt4 key购买 nike

我有一个.net core 3.1 mvc项目,并发布到azure web应用程序。然后在 kudu -> home/site/wwwroot 中,我创建了一个 html 文件,如下所示: enter image description here

但是当我想通过像这样的“https://xxx.azurewebsites.net/test111.html”这样的azure web应用程序访问html页面时,它有404错误: enter image description here

有什么方法可以通过代码或 azure 门户来解决此问题吗?

最佳答案

看起来您有 ASP.NET Core 应用程序?您是否启用了静态文件服务,回复:

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-5.0

关于c# - 如何访问直接放在kudu home/site/wwwroot中的html页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69750031/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com