Add permission to a .log in the program folder

0

You can add permissions to a specific file from c #, I mean, I have a desktop application developed with c #, the app works correctly for me, but when the inslog and the .log are left in the program folder (which is in c: / program files / miapp /) does not let me modify the .log file because I do not have the permissions, someone knows how I can modify this

    
asked by Alejo Florez 19.09.2017 в 15:46
source

1 answer

2

Since Windows XP, the operating system protects the contents of the program files folder, it is advisable in this case to put the log in a user or windows work folder if it is to be visible to all users.

Check the documentation for "Environment.SpecialFolder.ApplicationData"

In this MSDN forum link there is a similar question: Where to save files in app c #

    
answered by 19.09.2017 / 16:04
source