IDX20803:无法从 [英] IDX20803: Unable to obtain configuration from

查看:32
本文介绍了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

I used this sample as my example OpenIdConnect

我正在使用:

  • 一个网络应用
  • Web API

两者都使用 .Net Core 2.1.Web 应用程序使用 Azure AD 连接来获取发送到 API 的 JwtBearer 令牌.

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 :

Solved it by replacing, in appsettings.json :

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

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

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

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