Dotnet Core 2.1 broke WriteToken() on Linux kernels (ObjectDisposedException)
See original GitHub issueSystem.IdentityModel.Tokens.Jwt isn’t working anymore on our Linux environment when we try to generate a Jwt.
This problem is specifically in .NET Core 2.1 when calling new JwtSecurityTokenHandler().WriteToken(jwt)
An example of the bug can be found in this repo: https://github.com/AaronFixer/RsaMicrosoftIdentityJwtLinuxBug
Just run dotnet run
from within a Linux distro (I did this on Ubuntu 16.04 and 17.10).
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Upgraded dotnet core 2.1 - ObjectDisposedException: Safe ...
WriteToken() from the System.IdentityModel.Tokens.Jwt library to generate tokens. We've upgraded to 2.1 and this method is now working correctly ...
Read more >Fix List for DB2 Version 9.7 for Linux, UNIX and Windows
DB2 9.7 APAR Fix list contains list of APARs shipped for each fix pack in DB2 Version 9.7 for Linux, UNIX and Windows...
Read more >Install .NET on Linux distributions
This article details how to install .NET on various Linux distributions either manually, via a package manager, or via a container. Manual ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@brentschmaltz As you quite rightly pointed out, this issue isn’t actually a bug as disposed objects shouldn’t be available outside of their context.
On Windows however, the disposed object appears to still be available as the token is generated fine (run the code I originally submitted on Windows, and you’ll see the token is generated).
This isn’t correct behavior though. As it should throw the same error (
ObjectDisposedException
).@AaronFixer can you explain to me what you mean about ‘still works on Windows OS’?