Bonjour Lapinpanda,
c vrai j'essaye pas d'ecrire dans un fichier system bien sur mais car mon chemin était :
StreamWriter sw = new StreamWriter(@"parametre.txt");
donc l'erreur est:
System.UnauthorizedAccessException: Access to the path 'c:\windows\system32\inetsrv\parametre.txt' is denied.
mais quand je change le path:
StreamWriter sw = new StreamWriter(@"C:\parametre.txt");
l'erreur sera:
System.UnauthorizedAccessException: Access to the path 'c:\\parametre.txt' is denied.
voila je comprends pas le comportement de la fonction !!
Partager