Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a reference to the System.IdentityModel.Tokens DLL

How do I add a reference to the System.IdentityModel.Tokens dll?

It does not seem to come up in the Nuget Package Manager.

Do I need to download the DLL?

I have .Net 4.5 installed.

The following code will not compile without the reference:

SessionSecurityToken sst = e.SessionToken;
like image 295
ADH Avatar asked Dec 19 '22 21:12

ADH


2 Answers

It does exist on NuGet, and was last published 2013-02-08, so I don't understand why you couldn't find it. Try searching for System.IdentityModel.Tokens.ValidatingIssuerNameRegistry. The best way is to install it is using the NuGet packet manager.

You can find the package here: https://www.nuget.org/packages/System.IdentityModel.Tokens.ValidatingIssuerNameRegistry/4.5.0

like image 163
user3758148 Avatar answered Mar 06 '23 06:03

user3758148


In your solution, right click the References folder and choose "Add Reference"

From the Assemblies->Framework (.NET 4.5) list, select (check) System.IdentityModel and the press ok.

Add the using statement to the top of your class - using System.IdentityModel.Tokens;

like image 42
Tommy Avatar answered Mar 06 '23 06:03

Tommy