openid-connect - IDX10803 : Unable to create to obtain configuration

标签 openid-connect identityserver3

我的配置有 3 个站点:身份服务器 (Idp)、Windows 身份验证主机和我的最终用户客户端站点。在客户端站点上,我请求使用 [Authorize] 装饰的 Controller 。和身份服务器启动。

端口 44305 上的 Windows 主机显然抛出异常,身份服务器收到状态 500。我可以毫无问题地访问 Windows 主机站点 URL。我取回一个 XML 文档

我如何调试并找出阻止此身份验证过程的异常或错误是什么?我得到了一个由 3 部分组成的异常,其中最内部如下

InvalidOperationException: IDX10803: Unable to create to obtain configuration from: 'https://localhost:44305/'.

Microsoft.IdentityModel.Protocols.ConfigurationManager`1.<GetConfigurationAsync>d__3.MoveNext() in ConfigurationManager.cs

Windows 主机 OWIN 启动正在使用 UseWindowsAuthenticationService

身份服务器 OWIN 正在使用 AuthenticationOptions = WsFederationAuthenticationOptions
var wsFederationOptions = new WsFederationAuthenticationOptions
            {
                AuthenticationType = "windows",
                Caption = "Windows",
                SignInAsAuthenticationType = signInAsType,
                MetadataAddress = "https://localhost:44305/",
                Wtrealm = "urn:idsrv3"
            };
            app.UseWsFederationAuthentication(wsFederationOptions);
        }

这是请求和响应
Request URL:https://localhost:44315/
Request Method:GET
Status Code:302 Found
Response:Location:https://localhost:16433/connect/authorize?client_id=hms2015&redirect_uri=...

Request: https://localhost:16433/connect/authorize?client_id=hms2015&redirect_uri=...
Request Method:GET
Status Code:302 Found
Location:https://localhost:16433/login?signin=fde7508a6634698847c3076c9028604b

Request URL:https://localhost:16433/login?signin=fde7508a6634698847c3076c9028604b
Request Method:GET
Status Code:500 Internal Server Error

我没有可见的 SSL 问题。使用我的浏览器,我可以在没有任何警告的情况下打开来自不同站点的所有页面。我将我的 localhost IIS Express 证书添加到受信任的根证书。

最佳答案

我遇到了同样的问题 - SSL 证书似乎不受信任。为了解决这个问题,我将“localhost”IIS Express Cert 从 Personal CertStore 移到了受信任的根证书颁发机构,问题就消失了。

Cert

关于openid-connect - IDX10803 : Unable to create to obtain configuration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36299959/

相关文章:

sql-server - 让 IdentityManager 在两个不同的数据库上进行更改

reactjs - 将 OIDC 添加到具有受限路由的 React 应用程序

javascript - C#.NET : Server is not able to validate Angular Client [IdentityServer]

c# - IdentityServer 3 - 使用数据库中的客户端和范围

login - 如何在 IdentityServer4 中进行多步登录?

c# - 无法在身份服务器 3 中获取 token

azure - 使用 Oauth2/OpenID 连接构建 Web-API

c# - 登录后使用 oidc 和浏览器后退按钮的带有 azure 广告的 netcore 导致异常

angular - OpenID 连接 : Implicit or Auth Code flow for SPAs?

c# - 从程序集 Microsoft.IdentityModel.Protocols 派生的方法 'GetBaseConfigurationAsync' 无法减少访问