Re: Assembly loaded twice when Assembly.LoadFrom() is used
From: Phil Wilson (pdjwilson_at_nospam.cox.net)
Date: 09/25/04
- Next message: Sam Santiago: "Re: Memory Leak"
- Previous message: Chris Szabo: "Remoting Design Question"
- In reply to: fermo111: "Assembly loaded twice when Assembly.LoadFrom() is used"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Sam Santiago: "Re: Memory Leak"
- Previous message: Chris Szabo: "Remoting Design Question"
- In reply to: fermo111: "Assembly loaded twice when Assembly.LoadFrom() is used"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|