Open Closed

openiddi #8630


User avatar
0
829098@qq.com created
  • ABP Framework version: v8.0.2
  • UI Type: Angular
  • Database System: EF Core SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

The certificate for my IIS expired today. After updating the certificate, I received the following message: "has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource." My Server Is Windows Server 2022 ,My site hasn't been updated for over half a year, and no changes have been made to the server.

by the pic my api is admin.XXX.CN my web site is https://www.xxx.cn when i open web site , Automatic redirection https://www.xxx.cn/error

this is api logs

2025-01-13 14:22:03.673 +08:00 [INF] Request starting HTTP/1.1 GET http://admin.xxx.cn/health-status - null null 2025-01-13 14:22:04.094 +08:00 [INF] CORS policy execution successful. 2025-01-13 14:22:04.102 +08:00 [INF] Request finished HTTP/2 OPTIONS https://admin.xxx.cn/.well-known/openid-configuration - 204 null null 1178.3155ms 2025-01-13 14:22:04.124 +08:00 [ERR] An unhandled exception has occurred while executing the request. System.InvalidOperationException: When using X.509 encryption credentials, at least one of the registered certificates must be valid. To use key rollover, register both the new certificate and the old one in the credentials collection. at OpenIddict.Server.OpenIddictServerConfiguration.PostConfigure(String name, OpenIddictServerOptions options) at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd[TArg](String name, Func3 createOptions, TArg factoryArgument) at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at OpenIddict.Validation.ServerIntegration.OpenIddictValidationServerIntegrationConfiguration.Configure(OpenIddictValidationOptions options) at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd[TArg](String name, Func3 createOptions, TArg factoryArgument) at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at OpenIddict.Validation.OpenIddictValidationFactory.CreateTransactionAsync() at OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandler.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatcher|10_0(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task`1 matcherTask) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    After the updated certificate, you can try to update the password and redeploy the project.

Made with ❤️ on ABP v9.2.0-preview. Updated on January 20, 2025, 07:44