Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 8 Issue. Method 'get_ServerSideSessions' in type 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext`1' from assembly 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer, Version=7.0.20.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation. #57310

Open
1 task done
lerrieg opened this issue Aug 13, 2024 · 1 comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Comments

@lerrieg
Copy link

lerrieg commented Aug 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Unable to load the application upgrading Duende.IdentityServer to 7.0 with Microsoft.AspNetCore.ApiAuthorization.IdentityServer 7.0.20 in .NET 8.

This is still an issue for me. I tried the workaround mention on the other closed tickets related to this issue but no luck.

Microsoft.AspNetCore.ApiAuthorization.IdentityServer is still in 7, will there be a fix when the version 8 comes out? And when are we expecting that?

Error Message:
[12:57:55 FTL] Unhandled application exception
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Method 'get_ServerSideSessions' in type 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext1' from assembly 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer, Version=7.0.20.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFeatureProvider.PopulateFeature(IEnumerable1 parts, ControllerFeature feature)
at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature)
at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.GetControllerTypes()
at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.GetDescriptors()
at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.OnProvidersExecuting(ActionDescriptorProviderContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.UpdateCollection()
at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.Initialize()
at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.GetChangeToken()
at Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration1..ctor(Func1 changeTokenProducer, Action1 changeTokenConsumer, TState state) at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func1 changeTokenProducer, Action changeTokenConsumer)
at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.Subscribe()
at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.GetOrCreateDataSource(IEndpointRouteBuilder endpoints)
at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder endpoints, String name, String pattern, Object defaults, Object constraints, Object dataTokens)
at Program.

$(String[] args) in XXXXXXXXXXXXXXXXXXXXXXX\Program.cs:line XX
System.TypeLoadException: Method 'get_ServerSideSessions' in type 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext`1' from assembly 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer, Version=7.0.20.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
[12:57:55 INF] Application shutting down

Expected Behavior

Application should build and load with the latest Microsoft.AspNetCore.ApiAuthorization.IdentityServer 7.0.20 and be compatible with Duende.IdentityServer to 7.0 using .NET 8.

Steps To Reproduce

Create a .NET Core 8 application that has Microsoft.AspNetCore.ApiAuthorization.IdentityServer 7.0.20. Duende.IdentityServer 6.0.4 will get installed as its dependencies.

Manually upgrade the Duende.IdentityServer to 7.0.

On Build/Run, application is not loading and returning the error message above.

Exceptions (if any)

No response

.NET Version

8.0

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Aug 13, 2024
@omarceloribeiro
Copy link

omarceloribeiro commented Nov 13, 2024

need to upgrade the package to this version:

they are still on preview on this, I dont know why. I this was discontinued due to thirdy party license of identity server.

https://nuget.info/packages/Microsoft.AspNetCore.ApiAuthorization.IdentityServer/8.0.0-preview.6.23329.11
THIRD-PARTY-NOTICES.TXT
.NET Core uses third-party libraries or other resources that may be
distributed under licenses different than the .NET Core software.

#55456 (comment)
#49193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

No branches or pull requests

2 participants