473,320 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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

Nov 19 '05 #1
2 9548
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/lib...n.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.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================

<Fu*****@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com... 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



Nov 19 '05 #2
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..?

"Juan T. Llibre" wrote:
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/lib...n.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.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================

<Fu*****@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
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




Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Vagif Abilov | last post by:
Our .NET applications and Web sites use configuration files with custom sections. It's no problem to read a section with dots in its name from a Windows .NET application, e.g....
6
by: Tabi | last post by:
Hi, I want to create a custom section in my web.config that can hold my custom values. I created a section in web.config as written below. <configSections> <section name="myCustomSection"...
5
by: | last post by:
I'm trying to store something like this in my web.config file: <authInfoGroup> <authInfo UserId="uid1" Passport="pwd1" Expiry="" /> <authInfo UserId="uid2" Passport="pwd2" Expiry="" />...
0
by: Joel | last post by:
I am trying to do what I thought would be simple to do ie reading a section from my app.config file. I would like to have custom sections with custom attributes and be able to read/write them. ...
2
by: fabrice | last post by:
Hello, Is that a way for reading section of the web.config by code ? I m able to read the section <appSettings> like this : <appSettings> <add key="AppVer" value="Version 0.8 beta"/>...
0
by: Thirsty Traveler | last post by:
For some reason, a config file similar to the following config file was throwing an error: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="RpcQmsTrace"...
0
by: Thirsty Traveler | last post by:
For some reason, a config file similar to the following config file was throwing an error: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="RpcQmsTrace"...
0
by: =?Utf-8?B?UGhpbGlw?= | last post by:
I have a web.config custom configuration section using asp.net 2.0 configuration APIs. My custom configuration section inherits from System.Configuration.ConfigurationSection. I have a IIS root...
6
by: Nick | last post by:
Hi there, I have a Windows Service application that has a load of settings defined, I can access these using My.Settings. I would like to pass the NameValueCollection of the settings to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.