InvalidOperationException:提供了无效的请求URI。请求URI必须是绝对URI或必须设置BaseAddress

时间:2018-10-04 14:49:24

标签: c#

我正在按照以下教程通过在Asp.net Core中使用Visual Studio中的Connected Services连接到Cognitive Services Face API

https://docs.microsoft.com/en-us/azure/cognitive-services/face/vs-face-connected-service

但执行REST API调用

var response = client.PostAsync(uri, content).Result;

我收到此错误

System.InvalidOperationException: 'An invalid request URI was provided.
The request URI must either be an absolute URI or BaseAddress must be set.

我已经在Azure和认知服务上进行了有效订阅,并且API密钥正确。

0 个答案:

没有答案