Friday, February 11, 2011

Installing the SecurityTokenVisualizer Control

If you have started programming with Windows Identity Foundation, chances are that at some point in time you will need to be able to debug and view the contents of the Security Tokens that are being created.

Thankfully, Microsoft has created such a control which allows you to view the contents of the Security Token as well as the raw SAML Token that is being created.

Unfortunately, the original control was written back in November of 2009 and is therefore no longer valid for the latest release of the Windows Identity Foundation SDK.  In addition, because the code is quite old, it also does not support Visual Studio 2010 (only Visual Studio 2008).

You can download the SecurityTokenVisualizer Control from here:

However, once you have downloaded the control, installing it becomes the tricky part.

Before, you get started, you will need to make sure you have the following things installed/configured:

  1. Windows Vista/7 with IIS 7/IIS 7.5
  2. Windows Powershell
  3. Windows Identity Foundation Runtime
  4. Windows Identity Foundation SDK
  5. Visual Studio 2008 with SP1

Installing the SecurityTokenVisualizer Control

  1. Run the SecurityTokenVisualizerControlPDC09.Setup.exe
  2. Select a target location for extracting the files
  3. Once the extraction is complete, a Configuration Wizard will launch
  4. Since the Configuration Wizard was scripted a long time before the latest release of the Windows Identity Foundation SDK, it will not work.  Therefore, click on the Cancel button at this time.
  5. Now for some manual editing.  
  6. Look for a directory below the extracted SecurityTokenVisualizerControl called dependencyChecker
  7. You should find a file called Dependencies.xml
  8. Open up the file in a text editor of your choice and look for an element that looks like this:

    <dependency value=".\scripts\Dependencies\Check\CheckWifSdk.ps1"
    title="Microsoft Windows Identity Foundation SDK"
    explanation="The control requires Windows Identity Foundation SDK"
    downloadUrl="" />
  9. Remove this element from the file (there should be 2 instances of it total within the file)
  10. Save the changes to the file.
  11. From within the dependencyChecker directory, you should now be able to manually launch the ConfigurationWizard.exe.
  12. Once all of the checks complete successfully, you should be able to proceed with the installation of the SecurityTokenVisualizer Control.

No comments:

Post a Comment