究竟是什么AppDomain的回收 [英] What exactly is Appdomain recycling

查看:114
本文介绍了究竟是什么AppDomain的回收的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想弄清楚究竟是什么AppDomain的回收?
当请求首次从DOTNET的应用程序中的aspx页面,我明白,该应用一个AppDomain被创建,以及所需组件加载到应用程序域,并且请求将送达。
现在,如果web.config文件或bin文件夹等内容被修改,在AppDomain将被回收。
我的问题是,在回收过程结束后,将在AppDomain被加载组件和准备为下一个请求?或页面已被要求触发组件加载?

I am trying to figure out what exactly is Appdomain recycling? When a aspx page is requested for the first time from a DotNet application, i understand that an appdomain for that app is created, and required assemblies are loaded into that appdomain, and the request will be served. Now, if the web.config file or the contents of the bin folder, etc are modified, the appdomain will be "recycled". My question is, at the end of the recycling process, will the appdomain be loaded with assemblies and ready to serve the next request? or a page has to be requested to trigger the assemblies to load?.

推荐答案

嗯,我认为线程是越来越顺利到最终的结论,但在最后,这是其他。

Well, I think the thread was getting smoothly to a final conclusion, but in the end, it was otherwise.

我会尽量回答根据我的理解,并利用我刚才在其他网站阅读有关的问题。

I'll try to answer the question based on my understanding and leveraging what i've just read about in other web sites.

首先,我自己尽量避免比应用程序池的其他术语的循环,因为这可能会导致一个人感到困惑。现在,越来越工艺,游泳池和AppDomain中,我看到的画面如下:

First of all, I myself try to avoid the term recycle other than for Application Pools since this may render someone confused. Now, getting to process, pools and AppDomain, I see the picture as follows:

应用程序池,总之,一个内存区即保持了起来,一个被称为W3WP.exe进程,又名工作进程运行。回收一个应用程序池意味着将这个过程下来,从内存中消除,然后发起一个全新的工作进程,以新分配的进程ID。

An Application Pool is, in short, a region of memory that is maintained up and running by a process called W3WP.exe, aka Worker Process. Recycling an Application Pool means bringing that process down, eliminating it from memory and then originating a brand new Worker Process, with a newly assigned process ID.

关于应用程序域,我把它看作是存储区域的子集,即起着容器的作用,在上述区域内。换句话说,在存储器中的过程中,W3WP.EXE在这种情况下,是为应用程序的宏存储器区域,其存储子集区域,称为应用程序域。话虽如此,在存储器中的一个过程可以存储不同的应用领域,一个用于分配给一个给定的应用程序池内运行的每个应用程序

Regarding Application Domains, I see it as subsets of memory regions, within the aforementioned region that plays the role of a container. In other words, the process in memory, W3WP.exe in this case, is a macro memory region for applications that stores subset regions, called Application Domains. Having said that, one process in memory may store different Application Domains, one for each application that is assigned to run within a given Application Pool.

当涉及到回收,因为我最初告诉,它的东西,我自己只保留对应用程序池。为应用程序域,我preFER使用术语启动,以避免误解。在此基础上,重新开始一个应用程序域表示重新开始与新添加的设置,如刷新现有配置一个给定的应用程序。出现这种情况的内存,分区域,所谓的AppDomain,最终在于各自的应用程序池相关联的过程中的边界之内。这些新的设置可能来自文件,如

When it comes to recycling, as I initially told, it's something that I myself reserve only for Application Pools. For AppDomains, I prefer using the term 'restart', in order to avoid misconception. Based on this, restarting a AppDomain means starting over a given application with the newly added settings, such as refreshing the existing configuration. That happens within the boundaries of that sub-region of memory, called AppDomain, that ultimately lies within the process associated with a respective Application Pool. Those new settings may come from files such as

web.config中,
machine.config中,
Global.asax中,
bin目录,
APP_ code,

web.config, machine.config, global.asax, Bin directory, App_Code,

和有可能是别人。

的AppDomain彼此,使得总感隔离。如果不是这样,如果更改一个web.config,比方说,应用1,池来回报回收,分配给该池中的所有其他应用程序将得到重新启动,什么绝对不是由Microsoft和其他人需要的。

AppDomain are isolated from each other, that makes total sense. If not so, if changes to a web.config, let's say, of application 1, requited recycle of the pool, all other applications assigned to that pool would get restarted, what was definitely not desired by Microsoft and by anyone else.

总结我的观点,


  • 进程(W3wp.exe)

    • 的AppDomain 1

    • 的AppDomain 2

    • 的AppDomain 3

    • 的AppDomainñ

    N =分配的应用程序,以给定W3WP.EXE管理的应用程序池的数量

    n = the number of assigned applications to the Application Pool managed by the given W3WP.exe


    • 进程的内存区域相互
    • 隔离
    • 应用程序域被分存储器区域彼此隔离,在同一进程中

    • 全局IIS设置更改可能需要应用程序池回收(杀害并启动新的工作进程,程序w3wp.exe)

    • 应用程序范围设置更改应用程序域的关注,他们可能在某些特定的文件变化如那些上面勾勒后重新获得

    有关更多信息,我建议:

    For further information, I recommend:

    <一个href=\"http://blogs.msdn.com/b/david.wang/archive/2006/03/12/thoughts-on-iis-configuration-changes-and-when-it-takes-effect.aspx\">http://blogs.msdn.com/b/david.wang/archive/2006/03/12/thoughts-on-iis-configuration-changes-and-when-it-takes-effect.aspx

    <一个href=\"http://stackoverflow.com/questions/302110/what-causes-an-application-pool-in-iis-to-recycle\">What导致IIS应用程序池回收?

    <一个href=\"http://blogs.msdn.com/b/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx\">http://blogs.msdn.com/b/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx

    来自巴西的问候!

    这篇关于究竟是什么AppDomain的回收的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆