Monday, April 20, 2009

ManagementObjectSearcher Access Is Denied

  1. Open the Computer Management Microsoft Management Console
    (MMC) snap-in.
  2. Expand Services and Applications, and then select WMI Control.
  3. Right-click WMI Control, and then click Properties.
  4. In the WMI Control Properties dialog box, click the Security tab.
  5. Expand Root, select CIMV2, and then click Security.
  6. In the Security dialog box, click Advanced.
  7. In the Access Control Settings dialog box, click Add. Select localMachineName\ASPNET, and then click OK.
  8. In the Permission Entry dialog box, make sure that Apply Onto is set to This namespace and subnamespaces.
  9. Make sure that the Allow 'Enable Account' and Allow 'Remote Enable' check boxes are selected.
  10. Click OK in each dialog box until you return to the WMI Control Properties dialog box.
  11. Repeat steps 5 through 10 for other WMI namespaces that
    your application will access.
  12. Restart IIS. To do this, run
    IISRESET from the command line.

No comments: