gpt4 book ai didi

azure - 使用自托管 Azure Service Fabric 调用 Web API 时出错

转载 作者:行者123 更新时间:2023-12-03 05:48:36 25 4
gpt4 key购买 nike

我正在使用新的 Azure Service Fabric 项目。该项目包含 2 个有状态服务,如下图所示:

Solution tree in Visual Studio

当我运行应用程序时,资源管理器成功显示如下:

Service Fabric Explorer

但是当我尝试使用我的 API 时,http://localhost:19080/api/values ,我收到以下无效参数错误。它没有击中 Controller :

Invalid argument error message

请告知如何解决此错误。

最佳答案

正如 LoekD 提到的,端口 19080 由 Service Fabric 资源管理器使用。您可以在 API 项目的 ServiceManifest.xml 中找到应用程序的实际端口。应该有带有端点的资源部分,例如:

<Resources>
<Endpoints>
<Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="8315" />
</Endpoints>
</Resources>

关于azure - 使用自托管 Azure Service Fabric 调用 Web API 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50682643/

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