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 / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

When Are Supporting dll Assemblies Loaded Into AppDomain?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Smithers - 24 Sep 2007 19:49 GMT
My ASP.NET Web app uses a few 3rd party assemblies. Just wondering when
those are loaded into the Web app's AppDomain - and for how long do they
stay loaded.

Is an assembly loaded the first time a page is loaded (where the page in
question makes use of the 3rd party assembly)? Or are all assemblies
referenced by the Web app automatically loaded whenever the Web site starts
(or is restarted)?

Thanks.
bruce barker - 24 Sep 2007 20:38 GMT
unless your code dynamically loads dlls (via the api), asp.net loads all
dll at startup (first request).

the .net runtime has no method to unload a dll. the appdomain must be
unloaded to release a dll.

-- bruce (sqlwork.com)

> My ASP.NET Web app uses a few 3rd party assemblies. Just wondering when
> those are loaded into the Web app's AppDomain - and for how long do they
[quoted text clipped - 6 lines]
>
> Thanks.
Chris Fulstow - 25 Sep 2007 05:27 GMT
Hi

All the assemblies are loaded from the /bin folder as soon as your
application receives its first request.
The ApplicationManager creates a new AppDomain, which then loads your
third-party assemblies.  They'll stay loaded for the lifetime of your
AppDomain.

To see exactly which assemblies are loaded at any point you can run
something like:

Dim assemblies() As Assembly = AppDomain.CurrentDomain.GetAssemblies()
For Each asm As Assembly In assemblies
   Response.Write(String.Format("Loaded: {0}<br>", asm.FullName))
Next

Chris

> My ASP.NET Web app uses a few 3rd party assemblies. Just wondering when
> those are loaded into the Web app's AppDomain - and for how long do they
[quoted text clipped - 6 lines]
>
> Thanks.

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.