I am trying to define a local path for my WPF application to store some JSON files that are generated on operation.
I define a static path like so:
public static string LOCAL_PATH =
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
When I run it, I get the following error:
Exception thrown: 'System.Security.SecurityException' in mscorlib.dll
Additional information: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Is there a way to set the permission level of my app higher so that I can access this path?
Other alteranatives are welcome too. I have already gotten the app to work with IsolatedStorage, however that solution is not great because I would like the files to be in an accessible location for the user to modify outside of my app if needed.
Thanks!