What is the most reliable way to find the path to the config file for my app?
Posted on 2007-08-03
Visual Studio 2005
I need help understanding the app.exe.config file. Not so much with using it in code but understanding where it is stored.
For troubleshooting purposes I have added some buttons to my project that FTP various files from our app to our server. One of the files that I would like to be able to FTP is the config file. From what I can see it ends up buried in:
C:\Documents and Settings\Username\Local Settings\Application Data\. . .
while there is also a file with the same name in the app's folder.
Here are my questions.
1) I want the settings to be valid for all users, not just the user that installs the app or makes configuration changes. How is this done?
2) What is the easiest way to get the path to the config file so I can FTP it?
3) Why is there an app.exe.config in my app's folder and one in the Local Settings folder? The one in the app's folder is never changed and the actual configuration data seems to be stored in the other one.