IDX20803:无法从以下位置获取配置 [英] IDX20803: Unable to obtain configuration from

查看:863
本文介绍了IDX20803:无法从以下位置获取配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道已经回答了这个问题,但是我不知道人们到底在做什么(关于证书,ssl),他们都使用本地主机,而不是我.

I know this question has been answered, but I don't understand what people exactly do (about certificates, ssl) and they all use a localhost but not me.

我以该示例为例 OpenIdConnect

我正在使用:

  • 网络应用
  • Web API

两个都使用.Net Core 2.1. Web应用程序正在使用Azure AD连接来获取JwtBearer令牌,该令牌已发送到API.

Both are using .Net Core 2.1. The Web App is using the Azure AD connection to get a JwtBearer token, that is sent to the API.

看到API中的路由/api/information,请求从Web App发送到API,并且API返回上面的错误.

Seeing the route /api/information in the API, a request is sent from the Web App to the API, and the API is returning the error above.

确切的错误是:

System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://<mycompany>.onmicrosoft.com/<big Guid of 72 chars>/.well-known/openid-configuration'.

因此,我尝试通过添加证书,添加必要的库(System.Net.Http v4.3.3),检查Azure AD中的每个权限来解决此错误,但是这些都不起作用.

So I tried to solve this error, by adding certificates, adding the neccessary libraries (System.Net.Http v4.3.3), checked every permission in Azure AD but none of these worked.

如果您需要更多信息,我可以通过在本文中添加它们来提供它们.

If you need more information, I can provide them by adding them in this post.

推荐答案

通过替换为appsettings.json来解决它:

"AzureAd": {
     "Instance": "<APP_Uri_from_Azure_Portal>",
...
}

收件人

"AzureAd": {
     "Instance": "https://login.microsoftonline.com/",
...
}

这篇关于IDX20803:无法从以下位置获取配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆