gpt4 book ai didi

azure - Service Fabric 反向代理不工作

转载 作者:行者123 更新时间:2023-12-03 05:52:53 27 4
gpt4 key购买 nike

我在本地和部署的集群上都正确配置了反向代理,但我无法在反向代理端口上访问基于 owin 的 webAPI,这是我在此端口上得到的响应 enter image description here

我已关注this link并确定其配置正确。问题是我是否需要更改项目或代码中的某些内容才能使其正常工作。这是我的 webAPI 服务 list :

  <?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="BimWebApiPkg"
Version="1.0.9"
xmlns="http://schemas.microsoft.com/2011/01/fabric"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ServiceTypes>
<!-- This is the name of your ServiceType.
This name must match the string used in RegisterServiceType call in Program.cs. -->
<StatelessServiceType ServiceTypeName="BimWebApiType" />
</ServiceTypes>

<!-- Code package is your service executable. -->
<CodePackage Name="Code" Version="1.0.9">
<EntryPoint>
<ExeHost>
<Program>BimWebApi.exe</Program>
<WorkingFolder>CodePackage</WorkingFolder>
</ExeHost>
</EntryPoint>
</CodePackage>

<!-- Config package is the contents of the Config directoy under PackageRoot that contains an
independently-updateable and versioned set of custom configuration settings for your service. -->
<ConfigPackage Name="Config" Version="1.0.9" />

<Resources>
<Endpoints>
<!-- This endpoint is used by the communication listener to obtain the port on which to
listen. Please note that if your service is partitioned, this port is shared with
replicas of different partitions that are placed in your code. -->

<Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="80" />

</Endpoints>
</Resources>
</ServiceManifest>

我也尝试过不指定任何端口,但这也不起作用。

最佳答案

好像网址不正确。它缺少您应该指定应用程序名称和服务名称的部分。试试这个 -

http://localhost:19081/YOUR_APP_NAME/BimWebApi/api/TestAPI/GetString/

关于azure - Service Fabric 反向代理不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45706815/

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