Cannot read the WMICompatibility value with Registry.GetValue
I have an IIS7 (Wi开发者_JAVA技巧ndows 2008 Server) and wants to check via C#, if the IIS6 Compatibility mode is enabled. I do this checking the value
HKEY_LOCAL_MACHINE\\Software\\Microsoft\\InetStp\\Components","WMICompatibility"
On one server this works. On another server this doesn't work (. On both servers the Compatibility mode is installed. What could be the reason of the problem on the second server. It seems on the second server, that Registry.GetValue cannot find WMICompatibility.
I found this thread on IIS Forums
And in it one of the responses makes reference to this CodeProject article.
Should hopefully provide what you need.
精彩评论