Unable to use configSection with OpenNETCF.Configuration

  • Thread starter Giuseppe Lippolis
  • Start date
G

Giuseppe Lippolis

Hello everybody,
I'm having this app config:

<?xml version="1.0"?>
<configuration>
<configSections>
<section name="PF"
type="OpenNETCF.Configuration.NameValueSectionHandler,OpenNETCF" />
</configSections>

<appSettings>
<add key="ConnectionString" value="\My Documents\PoketFatDB.sdf"/>
</appSettings>

<PF>
<add key="0" value="N"/>
<add key="1" value="N"/>
<add key="2" value="N"/>
<add key="3" value="F"/>
</PF>
</configuration>

When I read with

Dim PF As NameValueCollection =
DirectCast(OpenNETCF.Configuration.ConfigurationSettings.GetConfig("PersonaF
isica"), NameValueCollection)

PF is nothing.

Can i do?
In windows\config the file machine.config it is present

OpenNETCF ver 1.2
 
P

Peter Foot [MVP]

You'll probably need to specify the full signature for OpenNETCF.dll
including the public key token e.g.
<section name="PF"
type="OpenNETCF.Configuration.NameValueSectionHandler,OpenNETCF,
Version=1.2.3346.0, Culture=neutral, PublicKeyToken=30C767B29D52D6E6" />

Peter
 
G

Giuseppe Lippolis

I have tried, but it always returns nothing. Have you some other
suggestion?
Thanks for the answer.
 
G

Giuseppe Lippolis

Thanks, but I had just fixed it.
I have tried to replace with custom a ConfigurationSectionHandler,
but the result is the same
 

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

Top