473,548 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "appSetting s" 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="appSettin gs"/>
Line 5:
Line 6: <section name="appSettin gs"
type="ConfigHan dler.ConfigHand ler,ConfigHandl er"/>

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 9575
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="a ppSettings.conf ig"/>

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*****@discus sions.microsoft .com> wrote in message
news:D7******** *************** ***********@mic rosoft.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 "appSetting s" 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="appSettin gs"/>
Line 5:
Line 6: <section name="appSettin gs"
type="ConfigHan dler.ConfigHand ler,ConfigHandl er"/>

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="a ppSettings.conf ig"/>

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*****@discus sions.microsoft .com> wrote in message
news:D7******** *************** ***********@mic rosoft.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 "appSetting s" 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="appSettin gs"/>
Line 5:
Line 6: <section name="appSettin gs"
type="ConfigHan dler.ConfigHand ler,ConfigHandl er"/>

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
1250
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. "MyCompany.Product.Feature". However an attempt to read such section from Web site's web.config file raises exception ("Can not create section handler"). Once the dots...
6
3788
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" type="ComIT.Applications.Common.ConfigurationSections.MyHandler" allowLocation="true" allowDefinition="Everywhere" /> </configSections>
5
11453
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="" /> </authInfoGroup> To do so, I've created the following section in my web.config: <configSections> <sectionGroup name="authInfoGroup">
0
1387
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. <configSections> <section name="customSection" type="what should I put here"/> </configSections> <customSection fileName="test.txt"...
2
7693
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"/> </appSettings>
0
1188
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" value="Off" /> <add key="RpcBizTalkTrace" value="Off" /> <add key="RemotingServerFlood" value="xxxxxx"/> </appSettings>
0
1056
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" value="Off" /> <add key="RpcBizTalkTrace" value="Off" /> <add key="RemotingServerFlood" value="xxxxxx"/> </appSettings>
0
1615
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 level web.config and an application level web.config, with the application web.config inheriting from the root level web.config. I am receiving...
6
5376
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 another class but unfortunately no matter what I try I get an empty colleciton back, i.e. System.Configuration.ConfigurationSettings.AppSettings
0
7512
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7803
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6036
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3495
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3475
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.