Results 1 to 4 of 4

Thread: appname.exe.config

  1. #1

    Thread Starter
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    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...
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    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.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    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.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width