Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / November 2005

Tip: Looking for answers? Try searching our database.

AppDomain.GetAssemblies broken?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Emmanuel Stapf [ES] - 10 Nov 2005 18:51 GMT
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

Signature

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

Willy Denoyette [MVP] - 11 Nov 2005 21:57 GMT
And what if B is not loaded in the same AD as A?

Willy.

> Hi,
>
[quoted text clipped - 13 lines]
> Thanks,
> Manu
Emmanuel Stapf [ES] - 12 Nov 2005 01:21 GMT
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

Signature

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

> And what if B is not loaded in the same AD as A?
>
[quoted text clipped - 17 lines]
> > Thanks,
> > Manu
Willy Denoyette [MVP] - 12 Nov 2005 09:18 GMT
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.

> The transition between the two assemblies is not done through AppDomain, I
> can guarantee this because my code is not creating AppDomain. As pointed
[quoted text clipped - 35 lines]
>> > Thanks,
>> > Manu
Emmanuel Stapf [ES] - 12 Nov 2005 16:11 GMT
> 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.

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.

> 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?

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] - 12 Nov 2005 23:06 GMT
>> What exactly do you mean with "touch the web config", do you mean you
>> change
[quoted text clipped - 12 lines]
> loaded in the new AppDomain created by ASP.NET, however GetAssemblies does
> not show all the one the debugger shows.

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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.