Groups | Blog | Home
all groups > dotnet clr > november 2005 >

dotnet clr : AppDomain.GetAssemblies broken?


Emmanuel Stapf [ES]
11/10/2005 10:51:02 AM
Hi,

I have a scenario where AppDomain.CurrentDomain.GetAssemblies () only return
part of the loaded assemblies in that AppDomain. I know it is not complete,
because the code doing this call is located in assembly B, which is called
from assembly A, and in the result of GetAssemblies I do get B, but not A,
which is obviously incorrect.

Is this a known issue? Any workaround? I don't have a reproducible test as
it happens on our CodeDom provider under IIS on Windows Server 2003 with SP 1
when we touch the machine config.

Thanks,
Manu

--
---------------------------------------------------------
Eiffel Software
http://www.eiffel.com
User group: http://groups.eiffel.com/join
Emmanuel Stapf [ES]
11/11/2005 5:21:52 PM
The transition between the two assemblies is not done through AppDomain, I
can guarantee this because my code is not creating AppDomain. As pointed out
in my original post, the issue arises in IIS with ASP.NET which creates
AppDomain.

I forgot to mention that I'm using .NET 1.1 on the Windows 2003 Server with
SP1 and this happens not when touching the machine config, but on the web
config for my test website.

Regards,
Manu

--
---------------------------------------------------------
Eiffel Software
http://www.eiffel.com
User group: http://groups.eiffel.com/join
---------------------------------------------------------


[quoted text, click to view]
Willy Denoyette [MVP]
11/11/2005 10:57:53 PM
And what if B is not loaded in the same AD as A?

Willy.

"Emmanuel Stapf [ES]" <EmmanuelStapfES@discussions.microsoft.com> wrote in
message news:35D14887-6188-4784-93CE-42DD999A932E@microsoft.com...
[quoted text, click to view]

Willy Denoyette [MVP]
11/12/2005 12:00:00 AM

"Emmanuel Stapf [ES]" <EmmanuelStapfES@discussions.microsoft.com> wrote in
message news:85A34301-CCDE-447C-A706-91D8919685C9@microsoft.com...
[quoted text, click to view]


Weird, I tried this on asp.net v2.0, all the assemblies loaded are shown
correctly when calling GetAssemblies. Will try the same under v1.1 SP1 on
W2K3 and post back as soon I have some results.

Willy.

Emmanuel Stapf [ES]
11/12/2005 8:11:05 AM
[quoted text, click to view]

That's correct, IIS is running and I'm just saving the web config, then I
try to access one of my ASP.NET pages and this is where the problem lies.

[quoted text, click to view]

Yes, I did attach the debugger and it shows that all my assemblies are
loaded in the new AppDomain created by ASP.NET, however GetAssemblies does
not show all the one the debugger shows.

Thanks,
Manu

Willy Denoyette [MVP]
11/12/2005 10:18:00 AM
What exactly do you mean with "touch the web config", do you mean you change
it's contents while your application is running? Note that asp.net will
unload the AD when you do this.
Did you try to attach the debugger while this happens, that way you can
check where the assemblies are loaded. Could it be that some assemblies are
loaded domain neutral?


Willy.

"Emmanuel Stapf [ES]" <EmmanuelStapfES@discussions.microsoft.com> wrote in
message news:1AC1D7F1-E80E-4418-96F7-ED0B2B56060F@microsoft.com...
[quoted text, click to view]

AddThis Social Bookmark Button