question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] MissingMethodException is thrown (IDX20803)

See original GitHub issue

Which version of Microsoft.IdentityModel are you using? Microsoft.IdentityModel.Tokens 6.20.0

Where is the issue?

  • M.IM.Logging
  • M.IM.Tokens

Is this a new or an existing app? The app is in production and I have upgraded to a new version of Microsoft.IdentityModel.Tokens (from 6.11.1 to 6.20.0)

Repro Everything worked without any issues until I have upgraded Microsoft.IdentityModel.Tokens from 6.11.1 to 6.20.0. Now when I am trying to log in I am getting this exception:

System.InvalidOperationException: IDX20803: Unable to obtain configuration from: ‘https://localhost:5001/.well-known/openid-configuration’. —> System.MissingMethodException: Method not found: ‘Void Microsoft.IdentityModel.Logging.IdentityModelTelemetryUtil.SetTelemetryData(System.Net.Http.HttpRequestMessage)’.

Expected behavior It should work as before without changing any settings or adding new NuGet Package. I tried to install Microsoft.IdentityModel.Logging package (before I had just Microsoft.IdentityModel.Tokens installed in my project) but it didn’t helped. I can’t find any breaking changes between versions 6.11.1 and 6.20.0 but maybe something has changed and needs to be changed?

Actual behavior An exception in thrown, before upgrading to latest package version everything worked properly:

System.InvalidOperationException: IDX20803: Unable to obtain configuration from: ‘https://localhost:5001/.well-known/openid-configuration’. —> System.MissingMethodException: Method not found: ‘Void Microsoft.IdentityModel.Logging.IdentityModelTelemetryUtil.SetTelemetryData(System.Net.Http.HttpRequestMessage)’. at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.ConfigurationManager1.GetConfigurationAsync(CancellationToken cancel) --- End of inner exception stack trace --- at Microsoft.IdentityModel.Protocols.ConfigurationManager1.GetConfigurationAsync(CancellationToken cancel) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brentschmaltzcommented, Jun 29, 2022

@tomaszzmudzinski did you upgrade just M.IM.Tokens or all of the assemblies? They must all be at the same version.

0reactions
slacksachcommented, Oct 14, 2022

We have the same issue, upgraded from 6.10.0, issue starts in 6.14 to 6.16

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

IDX20803: Unable to obtain configuration from: '[PII is ...
I saw this error as a result of my hosts file being corrupted (Docker Desktop added a section but corrupted the original contents...
Read more >
ASP.Net Core Web API throws 500 error when adding ...
Error I am getting: System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://{myoktadomain}/oauth2/default/.
Read more >
System.InvalidOperationException: IDX20803: Unable to ...
For some reason I get the following exception when my application is deployed: System.InvalidOperationException: IDX20803: Unable to obtain ...
Read more >
Sudden Microsoft Identity error IDX20803
Hello. All of a sudden I am no longer able to log into my ASP.NET web api on localhost. ... System.InvalidOperationException: IDX20803: Unable...
Read more >
[Fix]-How do I show signed in users information?
How to write logs to azure blob storage using managed identity? Exception thrown: 'System.MissingMethodException' in System.Private.CoreLib.dll · ASP.NET Core ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found