by Dominic Zukiewicz
18. October 2007 10:06
The admin's decided to run my Windows Service under the NetworkService account to improve security.
The problem is that where I thought I was saving temporary files to the directory of my application using Environment.CurrentDirectory , it was retrieving C:\windows\system32 ????
I therefore had to change the way I retrieved the local directory to:
string directory = new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName;
This means that any logging files that used to be xxx.log, now have to give their full path.