共用方式為


<debug> Element

Specifies whether to load types in the configuration file when the application starts. This element cannot be specified when the configuration file is named web.config and the remote type host process is Internet Information Services (IIS).

<configuration>
   <system.runtime.remoting>
      <debug>

<debug 
   loadTypes="true|false"
/>

Required Attributes

Attribute Description
loadTypes Specifies whether to load all types specified in this configuration file when the application starts, so that you can be alerted if there is an error in your configuration file. This helps to prevent simple typing errors from becoming a time-consuming debugging effort.

Example

The following configuration file example tells the .NET Remoting system to attempt to load the types specified in this file (in this case, the ServiceClass and TcpChannel types) when the client application starts.

<configuration>
   <system.runtime.remoting>
      <application>
         <client>
            <wellknown 
               type="ServiceClass, IService"
               url="tcp://computername:8080/TcpService"
            />
         </client>
         <channels>
            <channel ref="tcp"/>
         </channels>
      </application>
      <debug loadTypes="true" />
   </system.runtime.remoting>
</configuration>

Requirements

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

See Also

Remoting Settings Schema