将Web API上传到Azure使Blazor Web应用无法访问

发布于 2025-01-21 08:25:45 字数 467 浏览 3 评论 0原文

我一直在尝试了解我大约一个星期做错了什么。这是我的结构:

“在此处输入图像描述”

我正在发布Blazor Server应用程序编号1。然后,我创建了ASP.NET Web API,在我的本地主机上对其进行了测试,并希望将其上传到Azure以在线访问它。但是,在我在Visual Studio中发布了发布后,我的整个Blazor应用程序不再可以从HTTPS地址访问。然后,我再次从Visual Studio发布了我的Blazor应用程序,它再次工作正常。我做错了什么?是否有任何指南如何发布Blazor Web应用程序,然后在同一Azure帐户上托管ASP.NET Web API?

I have been trying to understand what I am doing wrong for about a week now. Here is my structure:

enter image description here

I am publishing Blazor server app to number 1. Then I have created ASP.Net Web API, tested it on my localhost and would like to upload it to Azure to access it online. However after I am hitting Publish in Visual Studio, my entire Blazor app is not any longer accessible from https address. Then I am Publishing my Blazor app again from Visual Studio and it is working fine again. What I am doing wrong? Is there any guide how to publish Blazor Web App and then host ASP.Net Web API on the same Azure account?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光无声 2025-01-28 08:25:45

当然,“在同一Azure帐户上”是可能的,但是当您有2个项目时,您将需要2个应用程序服务,也许是1个服务计划。

两个服务不能共享相同的URL。

我认为您不需要“ API管理服务”,但我可能错了。

"on the same Azure account" is of course possible, but when you have 2 projects you will need 2 App Services, maybe under 1 service plan.

Two services cannot share the same URL.

I don't think you need an "API Management service" but I could be wrong.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文