【发布时间】:2016-07-17 22:23:19
【问题描述】:
我的配置有 3 个站点:身份服务器 (Idp)、Windows 身份验证主机和我的最终用户客户端站点。在客户端站点上,我请求使用[Authorize] 装饰的控制器,然后身份服务器启动。
端口 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
Identity Server 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 证书添加到受信任的根证书中。
【问题讨论】:
标签: openid-connect identityserver3