0
votes

I heve built a Plugin, but for my needs, I have to write all logs on a text file. But on debug mode, I notice that when thecode step through the following snippet

if (!System.IO.Directory.Exists(_filePath))
            {
                System.IO.Directory.CreateDirectory(_filePath);
            }

it returns me this exception :

'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

On filesystem, "everyone" is granted on read/write

1

1 Answers

0
votes

I'm guessing that you are deploy your plugin in sandbox mode, and in this mode you have restrictions, take a look. If you aren't using crm online try deploy in another mode.