Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

System.IdentityModel.Tokens.Jwt 4.0.4.402070948 is not compatible? #139

Open
ahokkonen-dev opened this issue Feb 28, 2017 · 2 comments
Open
Labels

Comments

@ahokkonen-dev
Copy link

After upgrading IdentityServer3.AccessTokenValidation 2.13.0->2.14.0 in my WebApi -project I also upgraded System.IdentityModel.Tokens.Jwt -library 4.0.3.308261200->4.0.4.402070948.

Right after that next error started to occur:

An exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll but was not handled in user code

Additional information: Could not load file or assembly 'System.IdentityModel.Tokens.Jwt, Version=4.0.20622.1351, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Error throws on WebApi's Startup.cs:

            app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
            {
                Authority = "identityauthority endpoint",
                RequiredScopes = new[] { "secure.api" }
            });

Wondering why v4.0.20622.1351 is now required when it was earlier ok with v4.0.3.308261200. Also interesting that missed version is mentioned as 4.0.20622.1351, not 4.0.2.206221351

Any clues?

@brockallen
Copy link
Member

Hmm, not sure. We've not seen that issue before. Sorry.

@ahokkonen-dev
Copy link
Author

It magically solved by updating all owin -libraries to latest version 3.1.0.
Looks like Microsoft.Owin.Security.Jwt library v3.0.1 had (forced?) references to 4.0.20622.1351 verson

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants