HttpRuntimeSection.RequireRootedSaveAsPath Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy nazwa pliku musi być w pełni kwalifikowaną ścieżką pliku fizycznego.

C#
[System.Configuration.ConfigurationProperty("requireRootedSaveAsPath", DefaultValue=true)]
public bool RequireRootedSaveAsPath { get; set; }

Wartość właściwości

Boolean

true jeśli nazwa pliku musi być w pełni kwalifikowaną ścieżką pliku fizycznego; w przeciwnym razie , false. Wartość domyślna to true.

Atrybuty

Przykłady

W poniższym przykładzie pokazano, jak używać RequireRootedSaveAsPath właściwości .

C#
// Get the RequireRootedSaveAsPath property value.
Response.Write("RequireRootedSaveAsPath: " +
  configSection.RequireRootedSaveAsPath + "<br>");

// Set the RequireRootedSaveAsPath property value to true.
configSection.RequireRootedSaveAsPath = true;

Uwagi

Właściwość RequireRootedSaveAsPath określa, czy argument nazwy pliku do SaveAs metod musi być ścieżką rooted. Proces ASP.NET musi mieć uprawnienia do tworzenia plików w określonej lokalizacji.

Aby uzyskać więcej informacji, zobacz metody zapisywania Configuration zdefiniowane w klasie .

Dotyczy

Produkt Wersje
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8