Section or group name 'appSettings' is already defined. Updates to

G

Guest

Everyone--

I installed the .NET 2.0 framework on a server that also has version 1.1
installed. A few of my applications override the "appSettings" section in the
web.config with a custom config handler.

This all worked fine prior to installing the 2.0 framework but, now I get
the following error...

Section or group name 'appSettings' is already defined. Updates to this may
only occur at the configuration level where it is defined.

Line 4: <remove name="appSettings"/>
Line 5:
Line 6: <section name="appSettings"
type="ConfigHandler.ConfigHandler,ConfigHandler"/>

Any reason why this wouldn't work after .NET 2.0 framework was installed.
These web applications are set in IIS to use the 1.1 version of the
framework...

And, how can I fix this..?

Thanks,

--F
 
J

Juan T. Llibre

You don't need to re-define the appSettings element in 2.0.

What you remove are the keys, not the section itself.
See : http://msdn2.microsoft.com/en-us/library/ms228241

If you want to use an external file for the appSettings, use :

<appSettings configSource="appSettings.config"/>

See : http://msdn2.microsoft.com/en-us/library/ms228154

In the .NET Framework version 2.0, you can now include configuration settings
in a separate file for all configuration elements that support the configSource
attribute. However, when you use the configSource attribute, you must move
the entire section to the separate file because there is no merging of element settings.

There is a one-time write to the Web.config file when using the configSource attribute.
This causes the application to restart, but subsequent updates to the section are written
directly to the separate file and do not cause subsequent application restarts.

For more information, see :
http://msdn2.microsoft.com/en-us/library/system.configuration.sectioninformation.configsource

re:
These web applications are set in IIS
to use the 1.1 version of the framework...

They should work exactly the same way, then.

There's *no* communication between
the 1.1 Framework and the 2.0 Framework.

Check to see if inadvertently, the Application has
been configured to run against the 2.0 Framework.
 
G

Guest

Juan--

Thanks for the reply. I understand what your saying with regards to a .NET
2.0 application but, the issue I'm experiencing is with a .NET 1.1
application running on the same box where .NET 2.0 is installed...

So, essentially I have both .NET 1.1 and .NET 2.0 frameworks installed on
the same box and am running applications that were developed using .NET 1.1
and .NET 2.0...

Why would a .NET 1.1 app be failing when it's dependant upon the .NET 1.1
framework..?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top