Closed briantheitguy closed 1 month ago
I implemented the changes listed in this commit: https://github.com/dotnet/aspnetcore/issues/46025#issuecomment-1379085253
I am now hitting new errors after it builds..
MissingMethodException: Method not found: 'System.String Duende.IdentityServer.Extensions.HttpContextExtensions.GetIdentityServerIssuerUri(Microsoft.AspNetCore.Http.HttpContext)'.
Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityServerJwtBearerOptionsConfiguration.ResolveAuthorityAndKeysAsync(MessageReceivedContext messageReceivedContext)
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(ref TStateMachine stateMachine)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<TStateMachine>(ref TStateMachine stateMachine)
Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityServerJwtBearerOptionsConfiguration.ResolveAuthorityAndKeysAsync(MessageReceivedContext messageReceivedContext)
Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerEvents.MessageReceived(MessageReceivedContext context)
Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.AuthenticateAsync()
Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, string scheme)
Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.AuthenticateAsync()
Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, string scheme)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Duende.IdentityServer.Hosting.DynamicProviders.DynamicSchemeAuthenticationMiddleware.Invoke(HttpContext context) in DynamicSchemeAuthenticationMiddleware.cs
Duende.IdentityServer.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) in BaseUrlMiddleware.cs
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Here are my packages in the server project:
<ItemGroup>
<PackageReference Include="Braintree" Version="5.26.0" />
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="Duende.IdentityServer" Version="7.0.5" />
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="7.0.5" />
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="7.0.5" />
<PackageReference Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Version="8.0.0-preview.6.23329.11" />
<PackageReference Include="MudBlazor" Version="7.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
And attached is a screenshot for my localhost.
Microsoft has removed support for API authorization with IdentityServer in .NET 8 and above.
I have extracted the deprecated library from the .NET source and adapted it to IdentityServer 7 at https://github.com/paviad/apiauthorization-identityserver
Feel free to use.
Which version of Duende IdentityServer are you using? 7.0.5
Which version of .NET are you using? v8
Describe the bug Following the upgrade steps on the duende site to upgrade to v7, I am hitting errors while running the migration steps.
To Reproduce Upgrade a project from .Net 7 to 8 & Duende v6.03 to 7.05. Steps here: https://docs.duendesoftware.com/identityserver/v7/upgrades/v6.3_to_v7.0
Running the following...
Expected behavior I am expecting it to add the needed db table/column changes for the new version.
Log output/exception with stacktrace