【发布时间】:2021-12-21 10:29:24
【问题描述】:
我的客户在 http://localhost:9000/ 上的公司代理后面。我尝试通过该代码在我的 .Net Core 5 WebApi App 中设置代理:
var client = new CosmosClient(dbConfig.GetValue<string>("Endpoint"), dbConfig.GetValue<string>("Key"), new CosmosClientOptions()
{
WebProxy = new WebProxy("http://localhost:9000/", true)
});
但连接不工作。我收到了Service unavailable。关闭代理连接并直接访问 Internet 后,我的 .Net 后端正在工作。有什么想法吗?
【问题讨论】:
标签: c# azure-cosmosdb azure-cosmosdb-sqlapi