HttpRuntimeSection.RequireRootedSaveAsPath 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,指示該檔名是否必須是完全限定的實體檔案路徑。
public:
property bool RequireRootedSaveAsPath { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("requireRootedSaveAsPath", DefaultValue=true)]
public bool RequireRootedSaveAsPath { get; set; }
[<System.Configuration.ConfigurationProperty("requireRootedSaveAsPath", DefaultValue=true)>]
member this.RequireRootedSaveAsPath : bool with get, set
Public Property RequireRootedSaveAsPath As Boolean
屬性值
true如果檔名必須是完全限定的實體檔案路徑;否則,。 false 預設值為 true。
- 屬性
範例
以下範例說明如何使用該 RequireRootedSaveAsPath 屬性。
// Get the RequireRootedSaveAsPath property value.
Response.Write("RequireRootedSaveAsPath: " +
configSection.RequireRootedSaveAsPath + "<br>");
// Set the RequireRootedSaveAsPath property value to true.
configSection.RequireRootedSaveAsPath = true;
' Get the RequireRootedSaveAsPath property value.
Response.Write("RequireRootedSaveAsPath: " & _
configSection.RequireRootedSaveAsPath & "<br>")
' Set the RequireRootedSaveAsPath property value to true.
configSection.RequireRootedSaveAsPath = True
備註
此 RequireRootedSaveAsPath 特性指定了方法的檔名參數 SaveAs 是否必須是根路徑。 ASP.NET 程序必須有權限在指定位置建立檔案。
欲了解更多資訊,請參閱類別 Configuration 中定義的儲存方法。