Re: Assembly loaded twice when Assembly.LoadFrom() is used

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Phil Wilson (pdjwilson_at_nospam.cox.net)
Date: 09/25/04


Date: Sat, 25 Sep 2004 10:22:12 -0700

I've seen this in similar circumstances, and it's my guess that when .NET
needs the assembly for reflection/metadata purposes it loads it as a
resource, and when it's needed for calling entrypoints, it loads it as an
executable DLL. The result is that the DLL has two occurrences in the
hosting process.

-- 
Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://www.amazon.com/exec/obidos/tg/detail/-/1590592972/104-7044380-4696760
"fermo111" <fermo111@yahoo.it> wrote in message 
news:649247dd.0409241539.7e1a1660@posting.google.com...
> The following code results in a strange behavior.
>
> Assembly formAsm = Assembly.LoadFrom 
> ("http://localhost/net/MyAssembly.dll");
> Type formType = formAsm.GetType ("MySpace.MyForm");
> object formObj = Activator.CreateInstance (formType);
>
> Looking at the HTTP requests that are made, I noticed
> that the assembly is requested twice from the server.
> The first time the HTTP message is
>
> GET /net/MyAssembly.dll
>
> and the second time is
>
> GET /net/MyAssembly.DLL    (DLL is uppercase this time)
>
> The result is that the DLL takes twice the time to download.
>
> Any help on this?
>
> Luca 


Relevant Pages

  • Assembly loaded twice when Assembly.LoadFrom() is used
    ... Type formType = formAsm.GetType; ... Looking at the HTTP requests that are made, ... that the assembly is requested twice from the server. ... The result is that the DLL takes twice the time to download. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Execution detail of Asp.net
    ... page in another temp dir. ... then loads them. ... > compiles the page to a dll in a temp dir, and loads the page (again a ...
    (microsoft.public.dotnet.framework.aspnet)
  • understanding files
    ... I have some questions about some exe, dll, and other ... It's called upon from the registry key ... what do these execuables do and are they necessary? ... \config.nt loads it ...
    (microsoft.public.windowsxp.general)
  • seLinux: how do I avoid this error
    ... I am writing an application for fedora cora 5 that loads a DLL. ... seLinux is enabled, I get the following error from the attempt to load ...
    (comp.os.linux.development.apps)
  • Re: ok ... so...
    ... when you first hit an asp.net site, loads a new appdomain, then loads the ... asp.net dll for that page. ... > I have about 5 user controls which build up the page. ...
    (microsoft.public.dotnet.framework.aspnet)