Access rights are not granted with .FullAccess
Created at 17 Apr 2019, 14:18
A.
Access rights are not granted with .FullAccess
17 Apr 2019, 14:18
Hello,
I have a robot with the following code to write in a file :
protected override void OnStop() { string filePath = "C:\\Users\\Windows\\Documents\\cTrader\\Watcher\\" + Symbol.Code + " save"; using (StreamWriter saveWriter = new StreamWriter(filePath)) { for (int i = 0; i < horizontalLines.Count; i++) { string line = "Y" + horizontalLines[i].Y + "A" + horizontalLines[i].A + "R" + horizontalLines[i].R + "G" + horizontalLines[i].G + "B" + horizontalLines[i].B; saveWriter.WriteLine(line); } } }
If I give him no access he crashes OnStop because of the StreamWriter :
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
If I give him full access or filesystem access he does not run :
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FileSystem)]
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
I get the following error when I try to start it :
17/04/2019 11:10:10.040 | Watcher, USDCHF, h4 | Access rights are not granted.
Can you please tell me why this happens ?
Thanks.
Shares4UsDevelopment
18 Apr 2019, 09:20
check windows eventviewer if maybe defender or some other program is blcoking access
@Shares4UsDevelopment