|
-
Oct 20th, 2009, 10:48 AM
#1
appname.exe.config
What's the purpose of this file? I opened it in Notepad and noticed that one of the things stored in it is the connection strings to my access databases (my *.xsd file uses those connstrings) However, when I delete the *.exe.config file, the app still has the correct connection strings (pass words included) so, what the heck this the *.exe.config file event for? The info's compiled in the *.exe file anyways...
-
Oct 20th, 2009, 11:08 AM
#2
Re: appname.exe.config
It looks like it is where you can store some settings of your application, have a look at this MSDN article.
-
Oct 20th, 2009, 11:18 AM
#3
Re: appname.exe.config
This raises another question then, if the app gets deployed then the *.exe.config would be deployed with the exe file, in which if it's installed to the program files directory by the admin and the person who uses it logs in with a limited account (doesn't have write access to program files dir) how is the app going to save the My.Settings? It can't write to it's settings file.
And how come the connection strings are stored in the config file if the app has them in the exe file too? That seems like a security risk having it in the config file like that.
Last edited by JuggaloBrotha; Oct 20th, 2009 at 11:39 AM.
-
Oct 20th, 2009, 12:13 PM
#4
Re: appname.exe.config
My.Settings are stored in the USER's data folder for the app.... NOT in the *.exe.config. Application Settings are stored there though.... that's why Application Settings are readonly, while User level settings are read/write - and is how each user ends up with their own settings. As far as I know, connection strings aren't stored in the app itself, they are usually found in the ConnectionString node of the config file. Also, the connection strings can be encrypted... never done it myself, but I know it's possible.
The reason it still found your database after deleting the file, is because the source of it is the app.config file... so when you re-build the app, it takes the app.config, merges it with other config files (if there's more than one project in the solution) and creates the *.exe.config file from the results.
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|