<preLoad> Element 

Specifies the type to load the mappings from the classes that extend SoapAttribute. Although these types will be picked up automatically for serialization, the .NET Framework remoting system requires these configuration elements (or calling the programmatic equivalent) to deserialize properly.

<configuration>   <system.runtime.remoting>      <application>         <soapInterop>            <preLoad>

<preLoad type="FullTypeName" /> 
<preLoad assembly="AssemblyName" />

Optional Attributes

Attribute Description

type

Specifies the type to preload to enable deserialization. This includes version, culture, and public key information if the containing assembly is in the global assembly cache.

assembly

Preloads all types in the specified assembly.

Example

The following example associates the element ElementName and the XML namespace Example:mynamespace with the .NET type TypeName implemented by the AssemblyName assembly. The same is true of the XML type and namespace.

<configuration>
   <system.runtime.remoting>
      <application name="soapInterop">
         <soapInterop>
            <interopXmlElement 
               xml="ElementName,Example:mynamespace"
                clr="TypeName,AssemblyName"
            />
            <interopXmlType  
               xml="XmlTypeName,Example:TypeNamespace" 
               clr="TypeName,AssemblyName"
            />
            <preLoad
               type="TypeName"
               assembly="AssemblyName"
         </soapInterop>
      </application>
   </system.runtime.remoting>
</configuration>

Requirements

Configuration Files: Application configuration file, machine configuration file (Machine.config)

See Also

Reference

Remoting Settings Schema