ProcessModelSection.ServerErrorMessageFile Property

Gets or sets a value indicating the file whose content must be used when a fatal error occurs.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

public string ServerErrorMessageFile { get; set; }
/** @property */
public String get_ServerErrorMessageFile ()

/** @property */
public void set_ServerErrorMessageFile (String value)

public function get ServerErrorMessageFile () : String

public function set ServerErrorMessageFile (value : String)

Not applicable.

Property Value

The path of the file used when a fatal error occurs.

The file whose content is used instead of the default Server Unavailable message.

The file location can be a relative or an absolute file path.

The following code example shows how to use the ServerErrorMessageFile property.

// Get the current ServerErrorMessageFile property value.
string srvErrMsgFile = 

// Set the ServerErrorMessageFile property to
// "custommessages.log".
processModelSection.ServerErrorMessageFile = 

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions