Export (0) Print
Expand All

WmiConfigurationAttribute.HostingGroup Property

Gets or sets the hosting group for the WMI provider.

Namespace:  System.Management.Instrumentation
Assembly:  System.Core (in System.Core.dll)

public string HostingGroup { get; set; }

Property Value

Type: System.String
A String value that indicates the hosting group for the WMI provider.

Hosting groups only apply to providers that are hosted in-process. The value is ignored for decoupled providers.

A hosting group is a set of in-process providers that are all assigned the same hosting group name. The hosting group name is a string that you define to logically group the providers. All of the in-process providers in the same hosting group running under the same security context are hosted within a single instance of the Wmiprvse.exe process. So, providers that share the same hosting group and security context share the same service host process.

In the following example, the WmiConfigurationAttribute is used to indicate that the assembly it is contained in implements an in-process provider that runs under the NetworkService security context and is hosted in a instance of the Wmiprvse.exe process that also hosts any other in-process providers in the same hosting group that also run within the NetworkService security context.

[assembly: WmiConfiguration("root\\NVPair", HostingModel = ManagementHostingModel.NetworkService), HostingGroup = "MyProviders"]

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft