System.Runtime.Remoting.RemotingConfiguration.CustomErrorsEnabled Method

Indicates whether the server channels in this application domain return filtered or complete exception information to local or remote callers.

Syntax

public static bool CustomErrorsEnabled (bool isLocalRequest)

Parameters

isLocalRequest
true to specify local callers; false to specify remote callers.

Returns

true if only filtered exception information is returned to local or remote callers, as specified by the isLocalRequest parameter; false if complete exception information is returned.

Remarks

Complete exception information includes the exact server exception and the server stack trace. Filtered information includes a standard remoting exception but no server stack trace.

The CustomErrorsEnabled method reflects configuration settings that were specified in the mode attribute of the <customErrors> element of the application configuration file. For more information about configuration options, see [<topic://cpconconfiguration>].

The following table shows the three server channel property values that specify which callers receive exception information and what type of information they receive.

off

All callers receive complete exception information.

on

All callers receive filtered exception information.

remoteOnly

Local callers receive complete exception information; remote callers receive filtered exception information.

The following table shows the interaction of the isLocalRequest parameter and the server channel property.

on

true

true

Local callers receive filtered exception information.

on

false

true

Remote callers receive filtered exception information.

off

true

false

Local callers receive complete exception information.

off

false

false

Remote callers receive complete exception information.

remoteOnly

true

false

Local callers receive complete exception information.

remoteOnly

false

true

Remote callers receive filtered exception information.

For information about using application configuration files to control the return of exception information to callers, see the <customErrors> element.

Requirements

Namespace: System.Runtime.Remoting
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0