WIF 4.0 SDK FederatedPassiveSignIn control missing smart tag FIX

Published:
Windows Identity Framework SDK Version 4.0. Fix for missing smart tag on FederatedPassiveSignIn ASP.Net user control.

If you have ever worked with the identity framework then I am sure you are aware of FedUtil, the utility used to configure a SecurityTokenService (STS) in the Relying Party application (RP).  

For me, I am relatively new to WIF, I have followed online tutorials and SDK samples to the T, nothing frustrates me more however than when a step in a tutorial does not work as intended.  I intend to use passive sign in for my application and therefore decided to utilize the FederatedPassiveSignIn control on my ASP.Net applications login page.

The instructions for doing so are quite clear; Drag and drop a FederatedPassiveSignIn control on to your web form, set the UseFederationPropertiesFromConfig control property to “True”.  From here you can either right click on the new control or expand the smart tag to reveal a URI that allows you to directly invoke FedUtil via the new control.

If you are like me and are using the Windows Identity Foundation SDK 4.0 you will notice that neither the smart tag nor the context menu option is available for invocation.

Per Microsoft documentation, the only time these two options would be unavailable is if the SDK itself is not installed (runtime only).  So I followed the steps found online via so many open blogs e.g. uninstall all WIF components and reinstall (annoyingly time consuming).  

Still no joy after uninstall / reinstall; so I decided to take a peek at the Microsoft.IdentityModel.Web.Controls.FederatedPassiveSignInDesigner class within the Microsoft.IdentityModel.dll.  Within this class you will find a small method “IsFedUtilInstalled” taking no parameters and returning a simple Boolean type.  

To my surprise I find a hardcoded registry check:  RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows Identity Foundation SDK\\Setup\\v3.5");  

Again, I am using SDK 4.0; I am also running Windows 7 64bit.  I decided to investigate the registry settings; the registry key does exist; only it is named v4.0.  I tried a simple rename of the regkey to v3.5 (this did not work)

Because of my OS version I also checked the wow6432 path and yet another registry setting exists here (of the same general path), I renamed this node to v3.5 and BAM my smart tag / context menu options are available again.
0
4,041 Views

Comments (1)

Author

Commented:
Dear LHerrou, although my article does not meet minimum characters, it is still valuable information that should be made available and took significant research on my part to solve.  This information should be welcomed on experts exchange as it originated from me and has not been posted else where (yet).  If articles is not a good place for this information then please direct me to where a good place is.  If one does not exist then I will place this valuable fix in the public domain.

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.