IOException:IDX20807:无法从以下位置检索文档:“System.String”。HttpResponseMessage:
我正在使用 Asp.Net Core 3.1 并通过 Challenge 方法,调用外部端点进行身份验证
public async Task<IActionResult> Challenge(string provider, string returnUrl,string userName)
{
var props = new AuthenticationProperties
{
RedirectUri = Url.Action(nameof(Callback)),
Items =
{
{ "returnUrl", returnUrl },
{ "scheme", provider },
},
Parameters =
{
{ OidcConstants.AuthorizeRequest.LoginHint, userName }
}
};
var result = Challenge(props, provider);
return result;
}
错误:
An unhandled exception occurred while processing the request.
IOException: IDX20807: Unable to retrieve document from: 'System.String'. HttpResponseMessage: 'System.Net.Http.HttpResponseMessage', HttpResponseMessage.Content: 'System.String'.
Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(string address, CancellationToken cancel)
InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.
Microsoft.IdentityModel.Protocols.ConfigurationManager<T>.GetConfigurationAsync(CancellationToken cancel)
感谢,任何快速反应。
THE END
二维码