Custom ConfigurationSectionHandler and type

  • Thread starter Thread starter Jiho Han
  • Start date Start date
J

Jiho Han

I've written some before but never ran into this. I happened to write a
simple custom ConfigurationSectionHandler implementation in my single .exe
file. Thinking since it's in the executing assembly I can forget the assembly
name. It didn't work. I had to specify the .exe assembly in order for it
to load. Can someone explain?

Thanks

<section name='xyz' type='MyCompany.MyApplication.MyExecutable.MyConfigurationSectionHandler'/>

Jiho Han
Senior Software Engineer
Infinity Info Systems
The Sales Technology Experts
Tel: 212.563.4400 x216
Fax: 212.760.0540
(e-mail address removed)
www.infinityinfo.com
 
I've written some before but never ran into this. I happened to write a
simple custom ConfigurationSectionHandler implementation in my single .exe
file. Thinking since it's in the executing assembly I can forget the assembly
name. It didn't work.

No, that won't work, since you need to make this config section
handler available to the .NET config system - the .NET runtime will
call your code. It doesn't help embedding it into your own EXE - it's
still the .NET runtime calling into your own code, so you need to make
that code visible and known to the .NET runtime.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
 
That's right. Thanks!
No, that won't work, since you need to make this config section
handler available to the .NET config system - the .NET runtime will
call your code. It doesn't help embedding it into your own EXE - it's
still the .NET runtime calling into your own code, so you need to make
that code visible and known to the .NET runtime.

Marc ================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
 
Back
Top