Bonjour,
J'ai bug lorsque je veux créer un dossier sur le serveur:
Could not find a part of the path "D:\".Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path "D:\".Mon code est :
private
void Page_Load(object sender, System.EventArgs e){
string chemin_fichier = this.Server.MapPath("../pj");Label1.Text = chemin_fichier;
// Specify the directory you want to manipulate.string path = chemin_fichier + @"\MyDir";// Determine whether the directory exists.if (Directory.Exists(path)) {
Label1.Text = "That path exists already.";
return;}
// Try to create the directory.DirectoryInfo di = Directory.CreateDirectory(path);
Label1.Text = "The directory was created successfully at {0}." + Directory.GetCreationTime(path);
}
Est-ce un problème de droit ou autre chose ?
Merci de vos reponses.
Math