This documentation is archived and is not being maintained.

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, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: