.NETGURU
IConfigurationSectionHandler - how does one implement it?
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngbeta' list.


Stuart C. Salsbury
I'm having trouble with a custom configuration section handler, and I found
some posts to the aspngconfig list that indicate that others are, too.

However, there were no responses to the questions raised in aspngconfig, so
perhaps with a larger audience someone who can help will be found!

Basically, to implement a custom configuration section handler, you're
supposed to implement the IConfigurationSectionHandler. However, only the
built-in configuration section handlers seem to be creatable at runtime.
The framework says that it can't create the object when it reads my
config.web. This has happened to others, too. I've been through some of
the working implementations from system.web.dll in ILDASM and can't see any
difference between my class and the others (other than that mine is
simpler).

One idea I've heard is that such classes need to come from a shared
assembly.

Can anyone provide guidance?

Thanks in advance,
Stuart Salsbury
Ernst & Young LLP

Reply to this message...
 
    
Stuart C. Salsbury
Thanks, Luis and Andy. It turned out that I needed to specify the assembly
in the configsections' <add /> element... which is a little inconsistent b/c
in other places in config.web (e.g. custom IHttpHandler's <httphandlers/>
element) I haven't had to specify it.

I'd be curious as to what the difference is between the reader for the
<configsections/> element (which seems to require my assembly to be named
specifically, and which I actually don't know which class does the job) and
the <httphandlers> element (which doesn't require my assembly to be named,
and which I know to be the class
System.Web.Configuration.HttpHandlersSectionHandler).

Anyway, I guess I'll be more thorough with assembly specification from
herein. I'm still in awe of how much power is in asp.net vs.
good-old-fashioned asp... I hope I never have to think about writing an
ISAPI extension again (perhaps that's optimistic, but I don't think so).

Thanks,
Stuart

-----Original Message-----
From: Luís Santo-Tomás Gutierrez [mailto:Click here to reveal e-mail address]
Sent: Monday, May 07, 2001 4:44 AM
To: aspngbeta
Subject: [aspngbeta] RE: IConfigurationSectionHandler -- how does one impl
ement it?

Hi Stuart,

Probably the class is right but just the framework don't find

Check this two points:
1. In config web you indicate the name of the class AND THE NAME OF THE
ASSEMBLIE wich contain it
In config web you need a line like this:
<add name="TAO" type="NameSpace.Class, YourAssembly" />
2. You deploy the assembly in a visible location (bin directory, assembly
cache, so on)

Hope this helps old companion (I'm an ex-cap gemini :))

Luis Santo Tomas

-----Mensaje original-----
De: Stuart C. Salsbury [mailto:Click here to reveal e-mail address]
Enviado el: viernes, 04 de mayo de 2001 22:01
Para: aspngbeta
Asunto: [aspngbeta] IConfigurationSectionHandler -- how does one
implement it?

I'm having trouble with a custom configuration section handler, and I
found
some posts to the aspngconfig list that indicate that others are, too.

However, there were no responses to the questions raised in aspngconfig,
so
perhaps with a larger audience someone who can help will be found!

Basically, to implement a custom configuration section handler, you're
supposed to implement the IConfigurationSectionHandler. However, only
the
built-in configuration section handlers seem to be creatable at runtime.
The framework says that it can't create the object when it reads my
config.web. This has happened to others, too. I've been through some
of
the working implementations from system.web.dll in ILDASM and can't see
any
difference between my class and the others (other than that mine is
simpler).

One idea I've heard is that such classes need to come from a shared
assembly.

Can anyone provide guidance?

Thanks in advance,
Stuart Salsbury
Ernst & Young LLP

Reply to this message...
 
 
System.Configuration.IConfigurationSectionHandler
System.Web.IHttpHandler




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification