Code: Select all
2025-01-06 17:54:08.499 +00:00 [ERR] An unhandled exception has occurred while executing the request.
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://xxxx/.well-known/openid-configuration'.
Will retry at '01/06/2025 17:55:38 +00:00'. Exception: 'System.IO.IOException: IDX20804: Unable to retrieve document from: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot
Ich habe den Rat gesehen, Folgendes hinzuzufügen, um die Protokollierung der PII zu aktivieren und mehr zu erhalten Details zum Fehler:
Code: Select all
IdentityModelEventSource.ShowPII = true;
IdentityModelEventSource.LogCompleteSecurityArtifact = true;
1)
Code: Select all
services.AddAuthentication(options =>
{
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
})
.AddOpenIdConnect(OpenIdConnectDefaults.AuthenticationScheme,
options =>
{
IdentityModelEventSource.ShowPII = true;
IdentityModelEventSource.LogCompleteSecurityArtifact = true;
...
Code: Select all
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseForwardedHeaders();
IdentityModelEventSource.ShowPII = true;
IdentityModelEventSource.LogCompleteSecurityArtifact = true;
...
Code: Select all
public void ConfigureServices(IServiceCollection services)
{
IdentityModelEventSource.ShowPII = true; // Trying to debug an issue in dev server
IdentityModelEventSource.LogCompleteSecurityArtifact = true;
...