I’m getting a FileIOPermssion exception thrown when trying to create a folder in Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) on some computers. I’ve established that there is some form of antivirus running on the computer in question, but I haven’t been able to get in contact with their IT department to find out what specifically they are using.
Has anyone else run into an issue an issue like this? I’ve tried googling for a while and haven’t come up with anything. Is there something I need to do to guarantee write permissions to the ApplicationData?
The problem was definitely caused by running the application off of the network drive. This put the application into Partial Trust which is preventing writing to the ApplicationData directory. Isolated Storage was supposed to work around this but I haven’t had any luck with it either. It produces the exact same error as using other File IO commands directly.
One thing that DOES work is to install the .NET 3.5 framework which changes the default trust level for applications running on network shares.