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)

<ConfigurationPropertyAttribute("serverErrorMessageFile", DefaultValue := "")>
Public Property ServerErrorMessageFile As String

Property Value

Type: System.String

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.
   Dim srvErrMsgFile As String = _
   processModelSection.ServerErrorMessageFile

' Set the ServerErrorMessageFile property to
' "custommessages.log".
   processModelSection.ServerErrorMessageFile = _
   "custommessages.log"

.NET Framework
Available since 2.0
Return to top
Show: