Bonjour,
je développe un service qui a besoin d'une surveillance du fichier de configuration, pour le recharger si changement sur ce fichier.
ceci me genere une execption qui proviendrait d'un probleme de permission de sécurité sur le fichier.Code:
1
2
3
4
5
6
7
8
9
10
11
12 [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] void Watch(string path, string filter) { FileSystemWatcher fw = new FileSystemWatcher(); fw.Path = path; fw.Filter = filter; fw.Changed += new FileSystemEventHandler(OnChanged); fw.IncludeSubdirectories = true; fw.EnableRaisingEvents = true; }
j'ai donc rajouter :
mais ca change rien.Code:[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
Est-ce que qqun pourrait m'aider ?
Merci