I have a Windows service that should look for a configuration file in its current directory.
So I use directory.getcurrentdirectiry() but instead of the
directory.getcurrentdirectiry()
Don't use Directory.GetCurrentDirectory(). I had the same exact problem with C:\Windows\System32 being returned. Use this instead:
Directory.GetCurrentDirectory()
Path.GetDirectoryName(Application.ExecutablePath);