ServerWebConfig.AddElement Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Ajoute des éléments XML à un fichier Web.config pour une interface COM publiée dans une application COM+ compatible SOAP.
Cette API prend en charge l’infrastructure du produit et n’est pas destinée à être utilisée directement à partir de votre 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)
Paramètres
- FilePath
- String
Chemin d’accès du fichier Web.config existant.
- AssemblyName
- String
Nom de l’assembly qui contient le type ajouté.
- TypeName
- String
Nom du type ajouté.
- ProgId
- String
Identificateur programmatique du type en cours d’ajout.
- WkoMode
- String
Constante de chaîne qui correspond au nom d’un membre de l’énumération WellKnownObjectMode , qui indique comment un objet connu est activé.
- Error
- String
Chaîne dans laquelle un message d’erreur peut être écrit.
Implémente
Remarques
Pour le type spécifié, la AddElement méthode ajoute au fichier Web.config les éléments et <wellknown> les <activated> éléments en tant qu’enfants de l’élément <service> avec le XPath suivant :
/configuration/system.runtime.remoting/application/service
Les AssemblyNameparamètres , et TypeNameProgId les WkoModeparamètres sont incorporés dans les valeurs d’attribut des deux éléments ajoutés.
AddElement ne doit pas être appelé directement. Au lieu de cela, appelez la ProcessServerTlb méthode.