I am using the System.Management namespace in .Net to execute various WMI requests on a remote server. In my logs, I see that sometimes requests take 30 or 40 seconds, and other requests complete in less than a second.
When I see these slow requests, I try to connect to the box using wbemtest, but it always connects and quickly executes the request.
Any ideas, pointers, suggestions?
I noticed, looking at System.Management.ManagementScope in the reflector, that it seems to be losing the IWbemServices pointer. It looks like this is a COM interface that needs to call Release (Marshal.ReleaseComObject ()). I am not sure if this is related or not. I connect to many different servers throughout the process.
c # wmi
Josh clark
source share