开发者

ManagementException - "Provider failure" - what is this?

Somebody Else's Code says:

var wmiNetAdapterConfiguration = new ManagementClass("Win32_NetworkAdapterConfiguration开发者_如何学C");
var wmiNetAdapters = wmiNetAdapterConfiguration.GetInstances();
var count = wmiNetAdapters.Count; // throws exception

This bombs in my dev environment with System.Management.ManagementException: "Provider failure".

The original author is not available for questioning, and I have no idea what this means, or why it is failing in my environment. Help please!


This error also occur if you're connecting to a remote machine, authenticating using a local account (local to the remote machine!), and UAC is enabled. Setting per-namespace permissions might help, depends on the WMI namespace I suspect. Disabling UAC should resolve it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜