Partage via


HttpRuntimeSection.RequireRootedSaveAsPath Propriété

Définition

Obtient ou définit une valeur qui indique si le nom de fichier doit être un chemin d’accès complet au fichier physique.

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

Valeur de propriété

Boolean

true si le nom de fichier doit être un chemin d'accès complet au fichier physique ; sinon, false. La valeur par défaut est true.

Attributs

Exemples

L'exemple suivant indique comment utiliser la propriété 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

Remarques

La RequireRootedSaveAsPath propriété spécifie si l’argument nom de fichier aux SaveAs méthodes doit être un chemin racine. Le processus ASP.NET doit avoir l’autorisation de créer des fichiers à l’emplacement spécifié.

Pour plus d’informations, consultez les méthodes d’enregistrement définies dans la Configuration classe.

S’applique à