語言

HttpRuntimeSection.RelaxedUrlToFileSystemMapping 屬性

定義

取得或設定一個值,指示 HTTP 請求中的 URL 是否必須是有效的 Windows 檔案路徑。

public:
 property bool RelaxedUrlToFileSystemMapping { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("relaxedUrlToFileSystemMapping", DefaultValue=false)]
public bool RelaxedUrlToFileSystemMapping { get; set; }
[<System.Configuration.ConfigurationProperty("relaxedUrlToFileSystemMapping", DefaultValue=false)>]
member this.RelaxedUrlToFileSystemMapping : bool with get, set
Public Property RelaxedUrlToFileSystemMapping As Boolean

屬性值

true 如果 URL 不必遵守 Windows 路徑規則;否則 false。 預設值為 false。

屬性

備註

該 RelaxedUrlToFileSystemMapping 屬性決定了 HTTP 請求中 URL 的驗證方式。 若此屬性為 false,則使用 Windows 檔案系統路徑是否有效的規則來驗證 URL。

你可以在設定檔中設定 RelaxedUrlToFileSystemMapping 元素屬性 httpRuntime 來設定這個值。 更多資訊請參閱 httpRuntime Element(ASP.NET 設定結構)。

適用於