Szerkesztés

Megosztás a következőn keresztül:


RemotingConfiguration.CustomErrorsEnabled(Boolean) Method

Definition

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

public:
 static bool CustomErrorsEnabled(bool isLocalRequest);
public static bool CustomErrorsEnabled (bool isLocalRequest);
static member CustomErrorsEnabled : bool -> bool
Public Shared Function CustomErrorsEnabled (isLocalRequest As Boolean) As Boolean

Parameters

isLocalRequest
Boolean

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 Configuration of Remote Applications.

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.

Applies to