ManagementException: Provider loading failed while accessing Win32_NetworkAdapter

Possible duplicate:
How can I resolve the "Provider loading failed" for WMI requests?

When I try to access the Win32_NetworkAdapter table, I get the following exception:

Fix System.Management.ManagementException: Provider Download Failure Error

This is how I tried to access it:

 ManagementObjectSearcher mos = new ManagementObjectSearcher( @"SELECT * FROM Win32_NetworkAdapter WHERE Manufacturer != 'Microsoft' " + "AND NOT PNPDeviceID LIKE 'ROOT\\%'"); var managementObjectList = mos.Get(); // Exception: foreach (var networkAdapter in managementObjectList) { } 

So I get an exception:

 ManagementClass mgmt = new ManagementClass("Win32_NetworkAdapter"); using (ManagementObjectCollection objCol = mgmt.GetInstances()) { // Exception: foreach (ManagementObject obj in objCol) { } } 

I also get the same error when I try to open Win32_NetworkAdapter instances using WMI CIM Studio

What could be causing this and how can I make it work reliably?

+2
c # wmi
source share

No one has answered this question yet.

See similar questions:

7
How can I resolve the "Provider loading failed" for WMI requests?

or similar:

1424
How to fix "No breakpoint will be deleted at this time. No characters have been loaded for this document." a warning?
1327
Why is it important to override GetHashCode when the Equals method is overridden?
780
How to enable assembly failure logging (Fusion) in .NET.
683
Error - Unable to access IIS metabase
392
Failed to load Entity Framework provider type?
one
Function call cannot be calculated
0
How to access individual elements of a deserialized Json object in C #?
0
Windows service Edit start name
0
ManagementObjectSearcher on a WMI array property
0
Provider loading failed in WMI, methods cannot be executed

All Articles