Share via


ProcessModelSection.ServerErrorMessageFile 属性

定义

获取或设置一个指示文件的值,当发生致命错误时必须使用该文件的内容。

public:
 property System::String ^ ServerErrorMessageFile { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("serverErrorMessageFile", DefaultValue="")]
public string ServerErrorMessageFile { get; set; }
[<System.Configuration.ConfigurationProperty("serverErrorMessageFile", DefaultValue="")>]
member this.ServerErrorMessageFile : string with get, set
Public Property ServerErrorMessageFile As String

属性值

发生致命错误时使用的文件的路径。

属性

示例

下面的代码示例说明如何使用 ServerErrorMessageFile 属性。


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

// Set the ServerErrorMessageFile property to
// "custommessages.log".
processModelSection.ServerErrorMessageFile = 
    "custommessages.log";
' Get the current ServerErrorMessageFile property value.
   Dim srvErrMsgFile As String = _
   processModelSection.ServerErrorMessageFile

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

注解

使用其内容的文件,而不是默认的“服务器不可用”消息。

文件位置可以是相对或绝对文件路径。

适用于