A
Alexander van Doormalen
I have a windows service which calls extensions. In 1 of those
extensions I want to load a config file (extension.dll.config). In that
config file I defined some ConfigurationSection's. For example:
<section name="somename" type="sonenamespace.someclassname,
someassembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
The loading part is done using
ConfigurationManager.OpenMappedExeConfiguration(ExeConfigurationFileMap,
ConfigurationUserLevel). So far so good.
Then from the Configuration instance I get, I want to get a
ConfigurationSection using the GetSection method. Now I get an error
saying it cannot find the assembly that contains the class which
represents this section.
I think this is because
1) The service (host), which created a seperate appdomain to load the
extensions in, is located in <installdir>\Bin\service.exe
2) The extensions are located in a dir <installdir>\Extensions.
You see this is 1 dir up and. If I copy the extension to the bin
directory where the service.exe is located everything can be found
perfectly. But this is not what I want and not how this product works
(its Microsoft MIIS btw.)
Anybody has some ideas how to get this to work. I played a bit with the
assemblyBinding config element but never got it to work. Probably
because you can't got outside the base dir (which is where the
service.exe is located).
I hope someone can help me with this because I'm pulling hears right
now.
extensions I want to load a config file (extension.dll.config). In that
config file I defined some ConfigurationSection's. For example:
<section name="somename" type="sonenamespace.someclassname,
someassembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
The loading part is done using
ConfigurationManager.OpenMappedExeConfiguration(ExeConfigurationFileMap,
ConfigurationUserLevel). So far so good.
Then from the Configuration instance I get, I want to get a
ConfigurationSection using the GetSection method. Now I get an error
saying it cannot find the assembly that contains the class which
represents this section.
I think this is because
1) The service (host), which created a seperate appdomain to load the
extensions in, is located in <installdir>\Bin\service.exe
2) The extensions are located in a dir <installdir>\Extensions.
You see this is 1 dir up and. If I copy the extension to the bin
directory where the service.exe is located everything can be found
perfectly. But this is not what I want and not how this product works
(its Microsoft MIIS btw.)
Anybody has some ideas how to get this to work. I played a bit with the
assemblyBinding config element but never got it to work. Probably
because you can't got outside the base dir (which is where the
service.exe is located).
I hope someone can help me with this because I'm pulling hears right
now.