I am trying to create a folder on my local computer from plugin' my code is :
string currentFIlePath = "C://myGeneralFile";
bool isFileInDir = Directory.Exists(currentFIlePath);
if (!isFileInDir)
{
System.IO.Directory.CreateDirectory(currentFIlePath);
}
FileInfo fInfo = new FileInfo(currentFIlePath);
fInfo.IsReadOnly = false;
return currentFIlePath;
At the line : System.IO.Directory.CreateDirectory(currentFIlePath);
I get an error
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=' SOME NUMBER ' failed.
What can I do to solve this?
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (