Edit

Share via


ServerWebConfig.AddElement Method

Definition

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

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

public:
 virtual void AddElement(System::String ^ FilePath, System::String ^ AssemblyName, System::String ^ TypeName, System::String ^ ProgId, System::String ^ WkoMode, [Runtime::InteropServices::Out] System::String ^ % Error);
public void AddElement (string FilePath, string AssemblyName, string TypeName, string ProgId, string WkoMode, out string Error);
abstract member AddElement : string * string * string * string * string * string -> unit
override this.AddElement : string * string * string * string * string * string -> unit
Public Sub AddElement (FilePath As String, AssemblyName As String, TypeName As String, ProgId As String, WkoMode As String, ByRef Error As String)

Parameters

FilePath
String

The path of the existing Web.config file.

AssemblyName
String

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

TypeName
String

The name of the type being added.

ProgId
String

The programmatic identifier for the type being added.

WkoMode
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.

Error
String

A string to which an error message can be written.

Implements

Remarks

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:

/configuration/system.runtime.remoting/application/service

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.

Applies to