Exception thrown: 'System.Security.SecurityException

Created at 07 Feb 2020, 09:56
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
KO

koktos632

Joined 18.01.2020

Exception thrown: 'System.Security.SecurityException
07 Feb 2020, 09:56


Hi!
This code generates an System.Security.SecurityException exception.

            using (WebClient v_WwwClient = new WebClient())
            {
                try
                {
                    v_sRawSentimentData = v_WwwClient.DownloadString("https://www.google.com/");
                } catch (Exception ex)
                {
                    Console.WriteLine(ex);
                }
            }

 

How to allow the indicator to read a remote file from URL?

Thanks!

 


@koktos632
Replies

PanagiotisCharalampous
07 Feb 2020, 10:06

Hi koktos632,

Change your cBot access rights to FullAccess. See below

[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

koktos632
07 Feb 2020, 10:29

RE:

PanagiotisCharalampous said:

Hi koktos632,

Change your cBot access rights to FullAccess. See below

...

It works.
Thanks!


@koktos632