RemotingConfiguration.CustomErrorsEnabled Method

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

Namespace:  System.Runtime.Remoting
Assembly:  mscorlib (in mscorlib.dll)

public static bool CustomErrorsEnabled(
	bool isLocalRequest
)

Parameters

isLocalRequest
Type: System.Boolean

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

Return Value

Type: System.Boolean
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.

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.

Value

Description

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.

Value

isLocalRequest

Return value

Description

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft