A few pages of my ASP.Net app connect directly to another service using WIF. WIF is just making inroads here, and while it is installed on the Test and Production servers, every time a new programmer or tester gets latest and happens to hit those pages without the WIF run-time installed on their machine, he gets a YSOD and an error about not finding Microsoft.IdentityModel ... which they don't ever read and instead fire off an IM telling me my app is broken.
I'd like to detect if the WIF runtime is installed and show a every helpful error message and link to the download page if not. I don't want to check for a specific .dll path as this might change... and there are already different paths for 3.5 and 4.0.
Is there a best way to detect if the WIF run-time is installed?
(obviously in a page that doesn't reference it already... which would not display correctly without it installed)
Edit
It looks like WIF is included in the framework with 4.5 so a 3.5/4.0 specific approach would be fine. It won't be necessary to be future-proof.
Official comment of microsoft:
Q: Under what registry key is WIF installed?
A: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsIdentityFoundation\setup\v3.5\.
Reference here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With