Some questions on configsections

  • Thread starter Thread starter Andrea Moro
  • Start date Start date
A

Andrea Moro

In web.config file I do as follow:

<configsections>
<sectiongroup name="Database">
<section name="Access" type="....


Ok problem is there in type. According to the help is only needed
the class' name of the class that will access to the section, and class
must inherits from IconfigurationSectionHandler
So I specified System.Configuration.NameValueSectionHandler and anything
else.

Run and got error. I take a look to a sample app that use the same
mechanisms, and I see that after type is specified this

"System, Version=1.0.3300.0,Culture=neutral,PublicKeyToken=....."

I copied and pasted this part, and app works.

Someone could help me to understand what that mean?

Thank y
Andrea
 
Andrea:
Because the class NameValueSectionHandler which you specified is located in
the GAC (global assembly cache) you must provide the fully quantified
assembly name....it's just one of those rules ;) It actually makes a lot of
sence, since you might have the same class but different versions in the
GAC...

Unlike the /bin which is local to your project, the GAC is global to all
applications.

Hope this sheds some light.

Karl
 

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

Back
Top