I have a windows service which needs to write some files to disk, if I don’t specify a path it tries to write them to system32 folder which throws an exception because the service is being executed under the localservice account, I would like to know which is the recommended location to save this files and which folder I could use so I don’t get permission exceptions?
Share
One logical place is the system temp folder, but it would really depend on what you were doing. Is the storage supposed to be persistent or temporary? How secure does it need to be? Would it be better stored in a database than the file system? All of these are things that I would consider.