Are you really sure the tag isn't appSettings ?... For appParams isn't part
of standard .net config files:
If you want to use appParams, you've got to declare it inthe xml and then
the way you access it isn't as simple as for appSettings:
1 - sample App.exe.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="appParams"
type="System.Configuration.NameValueSectionHandler ,system,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
Custom=null"/>
</configSections>
<appSettings>
<add key="key1" value="value1" />
</appSettings>
<appParams>
<add key="key2" value="value2" />
</appParams>
</configuration>
You'll notice that because appParams isn't standard, you have to declare it
in the configSections part.
2 - Accessing values (in C#) :
using System.Configuration;
using System.Collections.Specialized;
// It's easy to retreive value1:
string s1 = ConfigurationSettings.AppSettings["key1"]; // s1 contains
"value1".
// A little more tricky for value2:
NameValueCollection nvc = ConfigurationSettings.GetConfig("appParams") as
NameValueCollection;
string s2 = nvc["key2"]; // s2 contains "value2".
Olivier DALET
---------------
"John Galt" <nf*@nospam.com> a écrit dans le message de
news:O1**************@TK2MSFTNGP10.phx.gbl...
The problem is that this is being used by Microsoft's Data Application
Block. I need the connection screen info to display which system the
application is pointing to (Development, Production, etc.)
"Morris" <an*******@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com... Try: appSettings instead of <appParams><?xml version="1.0"
encoding="utf-8" ?><configuration><appSettings><add key="ConnectionString"
value="YourString"/></appSettings></configuration>
The rest looks good.
Good luck.