SPWebApplication.FileNotFoundPage property

取得或設定相對於\\Program Files\Common Files\Microsoft Shared\web server extensions\14\LAYOUTS\Locale_ID包含找不到檔案時所使用的錯誤資訊的 HTML 檔案的名稱。

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Property FileNotFoundPage As String
    Get
    Set
'用途
Dim instance As SPWebApplication
Dim value As String

value = instance.FileNotFoundPage

instance.FileNotFoundPage = value
public string FileNotFoundPage { get; set; }

Property value

Type: System.String
指定包含錯誤資訊的 HTML 檔案的名稱string 。如果值為a null reference (Nothing in Visual Basic)或空字串,或者指的檔案不存在, SharePoint Foundation會傳回標準 404 回應。

備註

SharePoint Foundation不支援的 IIS 應用程式通常可用的自訂錯誤頁面。只能有一個個別 SharePoint Web 應用程式,這必須是 HTML 中,而且不能包含動態的 ASP.NET 控制項的檔案。

請參閱

參照

SPWebApplication class

SPWebApplication members

Microsoft.SharePoint.Administration namespace