Re: AppDomain & finding assemblies [.NET 2.0]



Have you tried a codebase definition in your config file?
http://www.codeproject.com/dotnet/assemblydeployment.asp gives an example of
a file based codebase towards the end.

I believe you could also use the ResolveAssembly event for this
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemappdomainclassassemblyresolvetopic.asp
if you really have to. I have used this event a few times (doing things like
keeping assemblies in a database)

Cheers,

Greg
"Alexander van Doormalen" <avdoormalen@xxxxxxxxx> wrote in message
news:1146167320.655198.22190@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.



.



Relevant Pages

  • Re: [BUG] linux-next: Tree for May 19/20/21 - BUG at arch/x86/kernel/io_apic_64.c:353!
    ... Can you include the config when you send these, ... from next report will send across the .config file also. ... for the kernel bug discussed. ... # PCI IDE chipsets support ...
    (Linux-Kernel)
  • [PATCH] make miniconfig (take 2)
    ... Add "make miniconfig", plus documentation, plus the script that creates a ... minimal mini.config from a normal .config file. ... A shell script to automatically create mini.config from a normal .config ...
    (Linux-Kernel)
  • Re: log4net mysteriously stops logging
    ... Since the guy who put the logging in did this, the rest of us just carried it through. ... We call XmlConfigurator.Configure and pass it the FileInfo object that represents the config file. ... With the debugging in log4net enabled, ...
    (microsoft.public.dotnet.general)
  • Re: Upgrading to 7.0 - stupid requirements
    ... >> mods-enabled (symlinks for enabled Apache modules) ... the PHP port/package drops a file with the needed config ... all our virtualhosts in a single config file included into the main ... Until you install that one last port that breaks the config file you ...
    (freebsd-stable)
  • Re: X help, or config file for X on Minix 3.1.2-B3?
    ... Unable to locate/open config file ... by that name anywhere on my Minix system. ... Minix installation ...
    (comp.os.minix)

Loading