Skip to content

fix call method fail#41

Merged
alexhiggins732 merged 4 commits into
alexhiggins732:masterfrom
pigwing:master
Feb 14, 2025
Merged

fix call method fail#41
alexhiggins732 merged 4 commits into
alexhiggins732:masterfrom
pigwing:master

Conversation

@pigwing

@pigwing pigwing commented Aug 15, 2024

Copy link
Copy Markdown
Contributor

MethodAccessException: Attempt by method 'IdentityServer8.ResponseHandling.DiscoveryResponseGenerator+d__8.MoveNext()' to access method 'Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty<System.Collections.Generic.KeyValuePair2<System.String,System.Object>>(System.Collections.Generic.IEnumerable1<System.Collections.Generic.KeyValuePair`2<System.String,System.Object>>)' failed.


name: Bug report
about: call mehtod failed
labels: bug report

image

MethodAccessException: Attempt by method 'IdentityServer8.ResponseHandling.DiscoveryResponseGenerator+<CreateDiscoveryDocumentAsync>d__8.MoveNext()' to access method 'Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty<System.Collections.Generic.KeyValuePair`2<System.String,System.Object>>(System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.String,System.Object>>)' failed.
@pigwing pigwing changed the title fix call mehod fail fix call method fail Aug 15, 2024
MethodAccessException: Attempt by method 'IdentityServer8.ResponseHandling.DiscoveryResponseGenerator+<CreateDiscoveryDocumentAsync>d__8.MoveNext()' to access method 'Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty<System.Collections.Generic.KeyValuePair`2<System.String,System.Object>>(System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.String,System.Object>>)' failed.

@thommo thommo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use the extension method EnumerableIsNullOrEmpty. In IdentityServer4 it called IsNullOrEmpty, but this causes a conflict in .NET 8, so the extension method was renamed EnumerableIsNullOrEmpty in IdentityServer8. There were 8 occurrences of this method being called in IdentityServer4. Only 6 of them were updated to use the renamed extension. The remaining 2 (the target of this PR) were missed.

Comment thread src/IdentityServer8/src/ResponseHandling/Default/DiscoveryResponseGenerator.cs Outdated
Comment thread src/IdentityServer8/src/Services/Default/DefaultKeyMaterialService.cs Outdated
use EnumerableIsNullOrEmpty
use EnumerableIsNullOrEmpty

@pazof pazof left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MERGE!

mayank30 pushed a commit to mayank30/IdentityServer8 that referenced this pull request May 20, 2026
mayank30 pushed a commit to mayank30/IdentityServer8 that referenced this pull request Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants