IDX10708: 'System.IdentityModel.Tokens.JwtSecurityTokenHandler' cannot read this string: 'Bearer'.

Today I got the following message when trying to send the rawData of a JwtSecurityToken I had created manually:

IDX10708: ‘System.IdentityModel.Tokens.JwtSecurityTokenHandler’ cannot read this string: ‘Bearer’.

The problem was that the rawData portion of the JwtSecurityToken is not populated until the token has been validated. I ended up using the following solution to create and validate JWT Tokens.

comments powered by Disqus