CBot instance | UnauthorizedAccessException: Access to the path
Created at 05 Nov 2022, 00:09
CBot instance | UnauthorizedAccessException: Access to the path
05 Nov 2022, 00:09
Hi there everyone,
I'm facing some issues trying to write some events into a logfie by an "AccessDenied" exception. I'm pretty sure that the involved path has the proper rights (also I provided "Full Control" to "Everyone" user group )
Please find below the console output.
04/11/2022 18:59:04.407 | CBot instance [testBot_trade, XAUUSD, m1] started.
04/11/2022 18:59:04.891 | Crashed in OnStart with UnauthorizedAccessException: Access to the path 'S:\DATA\DEV\cTrader\log\ctader_testbot.log' is denied.
04/11/2022 18:59:04.938 | CBot instance [testBot_trade, XAUUSD, m1] crashed with error "Crashed in OnStart with UnauthorizedAccessException: Access to the path 'S:\DATA\DEV\cTrader\log\ctader_testbot.log' is denied."
I will appreciate any help you can provide me to troubleshoot this. Many thanks!!
Max
p3rr01ns4n0
05 Nov 2022, 00:19
Ok, I've found solution by changing
"[Robot(AccessRights = AccessRights.None)]" to "[Robot(AccessRights = AccessRights.FullAccess)]"
Open Thread:
https://ctrader.com/forum/calgo-reference-samples/54
Thx!
@p3rr01ns4n0