Dave
Tue Oct 24 10:23:40 CDT 2006
Hi Edwin,
I believe Adrian was referring to Application Settings in the 2.0 framework.
Application Settings on MSDN:
http://msdn2.microsoft.com/en-us/library/k4s6c3a0.aspx
They provide user or application-level settings that can be stored outside of
your application's .config file.
If you don't find this option to be feasible, I'm posting alternatives in
another response.
--
Dave Sexton
"Edwin Engelen" <EdwinEngelen@discussions.microsoft.com> wrote in message
news:C2A66BC9-E957-434D-8B49-366C7401BC74@microsoft.com...
> Our application is a windows app. I am already using my own config file that
> I distribute with the setup. It can be modified using another app.
> You said: "so that we could change and distribute a new web.config as we
> like". Because a lot settings are user-specific (a com-port for example) I
> cannot distribute new settings.
>
> Both questions remain open.
>
> "Adrian Parker" wrote:
>
>> Because of the problem with assembly versions etc in the web.config, we
>> moved all of our application settings to a settings.config file instead so
>> that we could change and distribute a new web.config as we like.
>>
>> We created an external windows app to maintain the settings in the config
>> files, and it checks a version number in the file to clear out old settings
>> as necessary. The web app will not run until the version in the config
>> file
>> matches the software version.
>>
>> "Edwin Engelen" <Edwin Engelen@discussions.microsoft.com> wrote in message
>> news:EBB6E8E8-5C6B-4971-B05C-CB0F1BA42439@microsoft.com...
>> | Currently, we are storing our application settings in the registry, but
>> we
>> | want them to be stored in config-files. In order to accomplish that I'm
>> using
>> | the .NET 2.0 System.Configuration namespace. A couple of my own
>> configuration
>> | class have already been derived from ConfigurationSection;
>> | ConfigurationProperty attributes have been added to the the properties as
>> | well. This all works very well, but I forsee some problems for the
>> future:
>> |
>> | Question1: In release 1 (R1) configuration property 1 (P1) is available.
>> In
>> | release 2 (R2) P1 is not required anymore and gets removed. When R2 tries
>> to
>> | read the config-file it encounters P1 and throws an exception because it
>> | isn't defined anymore. How can I resolve this, without reconfiguring the
>> | application?
>> |
>> | Some of assemblies are registered for com-interop and need to be
>> installed
>> | in the GAC. When assemblies are installed in the GAC, the full name
>> | (including version number) needs to be entered in the config-file in the
>> | attribute "/configuration/configSections/section@type".
>> |
>> | Question 2: The first release (R1) has version number 1.0.0.0 and the
>> | section defined in the config-file refers to version 1.0.0.0. The next
>> | release (R2) with version number 2.0.0.0 is installed. The config-file
>> stays
>> | unchanged, because the configurations must be kept. When R2 loads the
>> | configuration an exception is thrown with the message that the assembly
>> with
>> | version 1.0.0.0 couldn't be found. How can I upgrade the configuration
>> from
>> | R1 to R2?
>> |
>> | Thanks in advance,
>> | Edwin
>>
>>
>>