API Reference
Class
ServicesQueryException
Thrown when service enumeration fails to produce any results and diagnostics indicate the host was unreachable, access was denied, or all engines failed.
Inheritance
- Exception
- ServicesQueryException
Constructors
public ServicesQueryException(String machine, String methodTried, Boolean fallbackTried, Boolean hostUnreachable, List<String> errors) #Creates an exception describing a services query failure and aggregates diagnostic details.
Parameters
- machine System.String
- Target machine.
- methodTried System.String
- Primary method used.
- fallbackTried System.Boolean
- Whether fallbacks were attempted.
- hostUnreachable System.Boolean
- Whether host unreachable was detected.
- errors System.Collections.Generic.List{System.String}
- Detail messages from failures.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
public override Void GetObjectData(SerializationInfo info, StreamingContext context) #Returns:
VoidInherited from Exception
Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}") EditorBrowsable(1)Parameters
- info SerializationInfo
- context StreamingContext
Properties
public String MethodTried { get; } #Primary method used (e.g., Win32 API, WMI, SCM).
public Boolean FallbackTried { get; } #True when a fallback engine was attempted.
public Boolean HostUnreachable { get; } #True when diagnostics indicate the host was unreachable.
public IReadOnlyList<String> Errors { get; } #Collection of error strings captured during the attempt.
Inherited Properties
public MethodBase TargetSite { get; } #Inherited from Exception
public override String Message { get; } #Inherited from Exception
public override IDictionary Data { get; } #Inherited from Exception
public Exception InnerException { get; } #Inherited from Exception
public override String HelpLink { get; set; } #Inherited from Exception
public override String Source { get; set; } #Inherited from Exception
public Int32 HResult { get; set; } #Inherited from Exception
public override String StackTrace { get; } #Inherited from Exception