System.ServiceModel
4.0.0.0
System.Configuration.ConfigurationElement
The COM+ integration runtime creates services by inspecting the type library. When a COM+ component contains methods that pass a VARIANT, the system cannot determine the actual types to be passed prior to runtime. Therefore, when you attempt to pass a User Defined Type (UDT) within a VARIANT, it fails because it is not a known type for serialization.
To circumvent this problem, you can add the UDTs to the configuration file so that they can be included as known types on the appropriate service contract. In order to do so, you have to uniquely identify the UDT and the contract(s), that is, the original COM interface(s) that uses it.
The following example demonstrates adding two specific UDTs to the <userDefinedTypes> section of the configuration file for this purpose.
code reference: S_UEComUdtElement#0
The attributes of the <userDefinedType> element are defined as follows:
-
typeName: an optional attribute that provides the readable type name. This is not used by the runtime but helps a reader to distinguish the types.
-
typeLibID: a GUID string that specifies the registered type library that defines the type.
-
typeLibVersion: a string that specifies the type library version that defines the type.
-
typeDefID: a GUID string that specifies the specific UDT type within the registered type library.
When the service is initialized, the COM+ integration runtime looks up the specified types and adds them to the known types collection for the specified contracts.
Represents a User Defined Type (UDT) that is to be included in the service contract. This class cannot be inherited.
Constructor
4.0.0.0
To be added.
Initializes a new instance of the class.
Property
4.0.0.0
System.Configuration.ConfigurationProperty("name", DefaultValue=Mono.Cecil.CustomAttributeArgument, Options=System.Configuration.ConfigurationPropertyOptions.None)
System.Configuration.StringValidator(InvalidCharacters=null, MaxLength=2147483647, MinLength=0)
System.String
To be added.
To be added.
Gets or sets the readable type name.
Property
4.0.0.0
System.Configuration.ConfigurationPropertyCollection
To be added.
To be added.
To be added.
Property
4.0.0.0
System.Configuration.ConfigurationProperty("typeDefID", IsKey=true, IsRequired=true, Options=System.Configuration.ConfigurationPropertyOptions.IsRequired | System.Configuration.ConfigurationPropertyOptions.IsKey)
System.Configuration.StringValidator(InvalidCharacters=null, MaxLength=2147483647, MinLength=1)
System.String
To be added.
To be added.
Gets or sets a GUID string that identifies the specific UDT type within the registered type library.
Property
4.0.0.0
System.Configuration.ConfigurationProperty("typeLibID", IsRequired=true, Options=System.Configuration.ConfigurationPropertyOptions.IsRequired)
System.Configuration.StringValidator(InvalidCharacters=null, MaxLength=2147483647, MinLength=1)
System.String
To be added.
To be added.
Gets or sets a GUID string that identifies the registered type library that defines the type.
Property
4.0.0.0
System.Configuration.ConfigurationProperty("typeLibVersion", IsRequired=true, Options=System.Configuration.ConfigurationPropertyOptions.IsRequired)
System.Configuration.StringValidator(InvalidCharacters=null, MaxLength=2147483647, MinLength=1)
System.String
To be added.
To be added.
Gets or sets a string that identifies the type library version that defines the type.