Azure-Samples/active-directory-angularjs-singlepageapp-dotnet-webapi

Could not load type 'System.IdentityModel.Tokens.TokenValidationParameters'

spjeff opened this issue · 2 comments

ERROR
I've upgraded my project to the latest release of System.IdentityModel.Tokens.Jwt (5.0.0).

Now I get a runtime exception in my host:

Could not load type 'System.IdentityModel.Tokens.TokenValidationParameters' from assembly
'System.IdentityModel.Tokens.Jwt, Version=5.0.0.127, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.
( others at IdentityServer/IdentityServer3#3017 saw the same with JWT breaking change)

FIX
Run the below command on Package Manager Console for both Projects (TodoSPA & ToGoAPI)

Install-Package System.IdentityModel.Tokens.Jwt -Version 4.0.2.206221351

Then build, select root Solution TodoSPA, and press F5 to start both websites and run the solution. Should work OK now.

I recorded a video on the install steps on my blog.

Want to add to documentation README.MD?

http://www.spjeff.com/2017/10/05/video-azure-ad-protected-web-api-in-an-angularjs-spa/

Closing this as we are archiving this sample. Please check out the new sample at ms-identity-javascript-angular-spa-aspnetcore-webapi.