Anything Wrong With "preloading" Assemblies?



I am needing to create a sort of "plug-in architecture" whereby different
Web sites I maintain on the same server have slightly different
functionality. Some Web sites will need to use the functionality in some
assemblies, while others will get similar functionalilty from different
assemblies.

What I was thinking about doing - and I'd apprecaite your feedback on this -
is to load the assemblies required by a particular site into the site's
default application domain, and do this loading during Application_Start. I
would load the assemblies via Reflection (e.g., Assembly.Load()).

Two benefits of doing it this way:
1. I can have all the logic in one place... this is the logic that
determines which assemblies to load for the current site.

2. A minor benefit is that when members from a given assembly are eventually
required, the assembly is already loaded, thereby helping with runtime
performance.

Are there any significant downsides to doing it this way, or reasons I
should not preload these assemblies? Any "gotchas" I should account for?

Thanks!



.



Relevant Pages

  • RE: Anything Wrong With "preloading" Assemblies?
    ... Some Web sites will need to use the functionality in some ... assemblies, while others will get similar functionalilty from different ... would load the assemblies via Reflection ... A minor benefit is that when members from a given assembly are eventually ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: From ASP.NET 1.1 to 2.0:
    ... your hoster has also set the web sites to partial trust during the update ... Only assemblies that have the [AllowPartiallyTrustedCallers] attribute can ... my hosting partner updated my account from ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Anything Wrong With "preloading" Assemblies?
    ... Use inheritance and a class hierarchy to 'point' to the functionality. ... Some Web sites will need to use the functionality in some assemblies, while others will get similar functionalilty from different assemblies. ... What I was thinking about doing - and I'd apprecaite your feedback on this - is to load the assemblies required by a particular site into the site's default application domain, and do this loading during Application_Start. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Anything Wrong With "preloading" Assemblies?
    ... Some Web sites will need to use the functionality in some assemblies, while others will get similar functionalilty from different assemblies. ... What I was thinking about doing - and I'd apprecaite your feedback on this - is to load the assemblies required by a particular site into the site's default application domain, and do this loading during Application_Start. ... Are there any significant downsides to doing it this way, or reasons I should not preload these assemblies? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Referencing Assembly Question Without GAC?
    ... You could use assemblyBinding in the .config file to specify a ... Outside of the bin the assemblies are locked. ... >if I could have all web sites use 1 certain web sites bin as the assembly ...
    (microsoft.public.dotnet.framework.aspnet)