DuendeSoftware / Support

Support for Duende Software products
21 stars 0 forks source link

.NET 9, Method not found: RelationalQueryableExtensions.ExecuteDeleteAsync() #1479

Open cristalink opened 4 days ago

cristalink commented 4 days ago

Duende IdentityServer 7.0.8 .NET 9

IdentityServer throws the following exception in a basic usage scenario with EnablePushedAuthorizationEndpoint = true:

System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Int32> Microsoft.EntityFrameworkCore.RelationalQueryableExtensions.ExecuteDeleteAsync(System.Linq.IQueryable`1<!!0>, System.Threading.CancellationToken)'.
   at Duende.IdentityServer.EntityFramework.Stores.PushedAuthorizationRequestStore.ConsumeByHashAsync(String referenceValueHash)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Duende.IdentityServer.EntityFramework.Stores.PushedAuthorizationRequestStore.ConsumeByHashAsync(String referenceValueHash)
   at Duende.IdentityServer.Services.PushedAuthorizationService.ConsumeAsync(String referenceValue) in /_/src/IdentityServer/Services/Default/PushedAuthorizationService.cs:line 35
   at Duende.IdentityServer.Endpoints.Results.AuthorizeHttpWriter.ConsumePushedAuthorizationRequest(AuthorizeResult result) in /_/src/IdentityServer/Endpoints/Results/AuthorizeResult.cs:line 92
   at Duende.IdentityServer.Endpoints.Results.AuthorizeHttpWriter.WriteHttpResponse(AuthorizeResult result, HttpContext context) in /_/src/IdentityServer/Endpoints/Results/AuthorizeResult.cs:line 75
   at Duende.IdentityServer.Endpoints.Results.EndpointResult`1.ExecuteAsync(HttpContext context) in /_/src/IdentityServer/Endpoints/Results/EndPointResult.cs:line 34
   at Duende.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IdentityServerOptions options, IEndpointRouter router, IUserSession userSession, IEventService events, IIssuerNameService issuerNameService, ISessionCoordinationService sessionCoordinationService) in /_/src/IdentityServer/Hosting/IdentityServerMiddleware.cs:line 111
2024-11-13T11:18:26.9080213+10:00 [ERR] An unhandled exception has occurred while executing the request.
   [Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] { EventId: { Id: 1, Name: "UnhandledException" }, RequestId: "0HN83G47NM1Q4:00000023", RequestPath: "/connect/authorize/callback", ConnectionId: "0HN83G47NM1Q4" }

The exception is because ExecuteDeleteAsync was moved from RelationalQueryableExtensions.ExecuteDeleteAsync in .NET 8 to EntityFrameworkQueryableExtensions.ExecuteDeleteAsync in .NET 9.

See

RolandGuijt commented 3 days ago

IdentityServer 7.0 supports .NET 8. The upcoming 7.1 will support .NET 9 (in addition to 8).