共用方式為


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"

備註

所使用內容而非預設的伺服器不可用訊息的檔案。

檔案位置可以是相對路徑或絕對檔案路徑。

適用於