Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Section or group name 'appSettings' is already defined. Updates to

Reply
Thread Tools

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

 
 
=?Utf-8?B?RnVlaG5lcg==?=
Guest
Posts: n/a
 
      11-15-2005
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

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      11-15-2005
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/
======================================

<> wrote in message
news7F3D948-D212-4CF3-8BA0-...
> 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









 
Reply With Quote
 
 
 
 
=?Utf-8?B?RnVlaG5lcg==?=
Guest
Posts: n/a
 
      11-15-2005
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/
> ======================================
>
> <> wrote in message
> news7F3D948-D212-4CF3-8BA0-...
> > 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

>
>
>
>
>
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
section with in a section config file and reading that config file kampy Python 9 10-19-2012 10:59 PM
How to group objects from static library in a section? wyse03br@yahoo.com.br C Programming 4 03-27-2008 09:03 PM
Why does Windows Update indicate that updates are available which I have already installed? Jimmy Dean Computer Support 7 04-22-2004 11:34 PM
Why would anyone newgroup a "alt.a-plus.certification" when there is already a "alt.certification.a-plus" group? Skip Hendrix A+ Certification 1 11-12-2003 05:58 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57