my application uses the standard app.config to store the public configuration data. However, there are still some other data which are not public, but they still must be accessible all the time, persistent, changeable from out of the application as well as manually in case of some problems.
For example imagine that the application stores some licensing information within a file which must not be public available. However, an administrator must be able to edit this file using notepad or similar (without any special editors), so cryptography is out of the game.
Would you use isolated storage? Do you have some other suggestions? Since the application is not using any database, please do not consider storing withing a DB as an option, too.
So the question is how to store application data so that it is not as easy to modify by hand as with app.config, but still easily editable for a power user.
In a Microsoft Azure hosted application, a possible choice for storing configuration information externally is to use Azure Storage.
This article describes the syntax of configuration files and provides information about the three types of configuration files: machine, application, and security.
By default, Sitefinity CMS stores the connection string to the database in the DataConfig. config file, located in folder ~/App_Data/Sitefinity/Configuration/. You can move the connection string to the web.
The ConfigurationManager class enables you to access machine, application, and user configuration information. This class replaces the ConfigurationSettings class, which is deprecated. For web applications, use the WebConfigurationManager class.
What about an include file?
Like the file attribute in the appSettings Element or the SectionInformation.ConfigSource Property?
<configuration>
<appSettings file="machine-specific.config">
<add key="Application Name" value="MyApplication" />
</appSettings>
</configuration>
The included file can be protected from public access with regular filesystem access rights.
I would definitely NOT use isolated storage for that. Encryption would be ideal but since that is not acceptable for you...
Using environmental variables would work too I guess... But I would probably not use it myself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With