Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ServerWebConfig.AddElement Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Adds XML elements to a Web.config file for a COM interface being published in a SOAP-enabled COM+ application.

Namespace:  System.EnterpriseServices.Internal
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

public void AddElement(
	string FilePath,
	string AssemblyName,
	string TypeName,
	string ProgId,
	string WkoMode,
	out string Error


Type: System.String

The path of the existing Web.config file.

Type: System.String

The name of the assembly that contains the type being added.

Type: System.String

The name of the type being added.

Type: System.String

The programmatic identifier for the type being added.

Type: System.String

A string constant that corresponds to the name of a member from the WellKnownObjectMode enumeration, which indicates how a well-known object is activated.

Type: System.String

A string to which an error message can be written.


IServerWebConfig.AddElement(String, String, String, String, String, String)

For the specified type, the AddElement method adds to the Web.config file the <wellknown> and <activated> elements as children of the <service> element with the following XPath:


The AssemblyName, TypeName, ProgId, and WkoMode parameters are incorporated into the attribute values of the two added elements.

AddElement should not be called directly. Instead, call the ProcessServerTlb method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft