我已经使用Azure B2B提供程序已有几个月了,最近我不得不创建一个新目录。在此目录中,我面临以下问题:
An unhandled exception occurred while processing the request.
Exception: Correlation failed.
Unknown location
Exception: An error was encountered while handling the remote login.
Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler<TOptions>.HandleRequestAsync()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.MigrationsEndPointMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
我的OpenId配置(未达到OnAuthorizationCodeReceived):
public void Configure(string name, OpenIdConnectOptions options)
{
options.ClientId = azureOptions.ClientId;
options.Authority = azureOptions.Authority + "/v2.0/";
options.UseTokenLifetime = true;
options.CallbackPath = azureOptions.CallbackPath;
options.RequireHttpsMetadata = false;
options.ClientSecret = azureOptions.ClientSecret;
options.TokenValidationParameters.ValidateIssuer = false;
options.ResponseType = "id_token code";
options.Scope.Add("email");
options.Scope.Add("openid");
options.Scope.Add("profile");
options.Scope.Add("offline_access");
// Subscribing to the OIDC events
options.Events.OnAuthorizationCodeReceived = OnAuthorizationCodeReceived;
}
有什么办法解决吗?
谢谢!