WSFederation OWIN - Could not load type 'System.IdentityModel.Tokens.TokenValidationParameters' from assembly 'System.IdentityModel.Tokens.Jwt, Version=5.0.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
At the end of last year I blogged about the following exception I got when using the WSFederation OWIN middleware together with ADFS.
Could not load type 'System.IdentityModel.Tokens.TokenValidationParameters' from assembly 'System.IdentityModel.Tokens.Jwt, Version=5.0.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
The problem was related to an incompatibility between the OWIN version(5) and the Microsoft.IdentityModel.Tokens nuget packages. In the meanwhile some newer versions of this package are released, making the issue disappear starting from version 5.2.