I need to know where and how application settings (connections string) could be stored so that they can be changed at run time and saved.
I know in VS you can configure settings under Project>Properties and these get stored in the appname.exe.config file under apps install directory.But the “application scope” ones are not read/write at run time and if you change the ones under user scope a copy of the config file is created under users directory and wont be accessed by other users of the application.
I need to have a way so that the user can configure connection string, stored in a common config file, as per their needs from within the app and then have all other users(on that machine) can use that too. how can I achieve this?
Simplest, fastest solution is to create a configuration file in a shared location where normal users have rights to read/write.
Create a class with public properties for your configuration data, then serialize it to xml in this shared location.