在API管理服务实例下的Azure门户中,我已将证书* .api.mywebsite.com上传到“客户端证书”下。
在后端策略中,我添加了以下内容
<inbound>
<base />
<authentication-certificate thumbprint="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" />
<set-backend-service backend-id="servicefabric" sf-resolve-condition="@((int)context.Response.StatusCode != 200)" sf-service-instance-name="fabric:/ApiApplication1/Web1" />
</inbound>
在测试部分 要求的网址:https://tksfapim2.azure-api.net/myapp/api/values
当我单击发送时,出现以下错误。 在跟踪部分中,后端请求部分看起来像
service-fabric-backend (0.129 ms)
{
"message": "Request is being forwarded to the backend service. Timeout set to 300 seconds",
"request": {
"method": "GET",
"url": "https://10.0.0.4:8823/api/values",
service-fabric-backend(2.451毫秒){ “消息”:[ “调用后端服务时发生错误。”, “基础连接已关闭:无法为SSL / TLS安全通道建立信任关系。”, “根据验证过程,远程证书无效。” ]}
更新:
我正在使用实际的证书* .api.mywebsite.com(无法提供实际的证书详细信息),它不是自签名证书 服务面料详细信息
tktestsf2.westus.cloudapp.azure.com 104.42.210.66,该服务托管在https端点的端口8823上。
我输入了一个主机条目104.42.210.66 tktest.api.mywebsite.com。然后我致电https://tktest.api.mywebsite.com:8823/api/values进行通话,但未收到证书错误。因此证书有效。然后,我按照上述步骤进行操作,以使其与API Management一起使用。
我也通过api Managment public(40.118.149.203)进行了主机登录
40.118.149.203 tktest.api.mywebsite.com然后被称为 https://tktest.api.jumpstart.com/myapp/api/values 我收到了HTTP错误503。服务不可用。