The following table describes the modes that can be used with ComSvcConfig.exe.

Option

Description

install

Installs a configuration for a COM+ interface for Service Model integration.

Short form /i.

uninstall

Uninstalls a configuration for a COM+ interface from Service Model integration.

Short form /u.

list

Lists information about COM+ applications and components that have interfaces that are configured for Service Model integration.

Short form /l.

The following table describes the flags that can be used with ComSvcConfig.exe.

Option

Description

/application:<ApplicationID | ApplicationName>

Specifies the COM+ application to configure.

Short form /a.

/contract:<ClassID | ProgID | *,InterfaceID | InterfaceName | *>

Specifies the COM+ component and interface that will be configured as the contract for the service.

Short form /c.

While the wildcard character (*) can be used when you specify the component and interface names, we recommend that you do not use it, because you might expose interfaces that you did not intend to.

/hosting:<complus | was>

Specifies whether to use the COM+ hosting mode or the Web hosting mode.

Short form /h.

Using the COM+ hosting mode requires explicit activation of the COM+ application. Using the Web hosting mode allows the COM+ application to be automatically activated as required. If the COM+ application is a library application, it runs in the Internet Information Services (IIS) process. If the COM+ application is a server application, it runs in the Dllhost.exe process.

/webSite:<WebsiteName>

Specifies the Web site for hosting when Web hosting mode is used (see the /hosting flag).

Short form /w.

If no Web site is specified, the default Web site is used.

/webDirectory:<WebDirectoryName>

Specifies the virtual directory for hosting when Web hosting is used (see the /hosting flag).

Short form /d.

/mex

Adds a Metadata Exchange (MEX) service endpoint to the default service configuration to support clients that want to retrieve a contract definition from the service.

Short form /x.

/id

Displays the application, component, and interface information as IDs.

Short form /k.

/nologo

Prevents ComSvcConfig.exe from displaying its logo.

Short form /n.

/verbose

Outputs all warnings or informational text in addition to any errors encountered.

Short form /v.

/help

Displays the usage message.

Short form /?.

/partial

Generates a service configuration when the specified interface includes one or more method signatures that can be exposed. At service initialization time, compatible methods appear as operations on the service contract, and non-compatible methods are ignored and absent from the service contract.

If this flag is missing, the tool will not generate a service configuration when the specified interface includes one or more incompatible methods.

Description

The following example adds the IFinances interface of the ItemOrders.IFinancial component (from the OnlineStore COM+ application) to the set of interfaces that are exposed as Web services, using the COM+ hosting mode. All warnings will be output in addition to any errors encountered.

Code

Description

The following example adds the IStockLevels interface of the ItemInventory.Warehouse component (from the OnlineWarehouse COM+ application) to the set of interfaces that are exposed as Web services, using the Web hosting mode. The Web service is Web hosted in the OnlineWarehouse virtual directory of IIS.