应用程序域和要求 [英] AppDomain & Request

查看:100
本文介绍了应用程序域和要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了有关AppDomain的信息,但没有得到任何帮助.
假设我有2个网站A& B.对于每个站点,VirtualDirectory是在IIS6 +中创建的.两个站点都在同一个ApplicationPool下.
我有两个问题的情况下的情况.请针对每种情况下的每个问题回答.

案例:
请求访问IIS以访问站点A.AppDomain是在ApplicationPool中创建的.在该AppDomain中创建适当的HttpApplication并处理请求.
方案1:
网站 A 的其他请求会到达IIS.创建新的AppDomain并在此新的AppDomain中创建HttpApplication还是在第一个AppDomain(为第一个请求创建的)中创建HttpApplication?

方案2:
网站 B 的其他请求会到达IIS BUT.创建新的AppDomain并在此新的AppDomain中创建HttpApplication还是在第一个AppDomain(为第一个请求创建的)中创建HttpApplication?

谢谢

I read about AppDomain, but didn''t get something.
Assume I have 2 sites A & B. For each site the VirtualDirectory was created in IIS6+. Both sites are under the same ApplicationPool.
I have case with 2 scenarios with questions. Answer please on each question in each scenario.

Case:
Request hits IIS for site A. AppDomain is created in ApplicationPool. Appropriate HttpApplication is created in that AppDomain and request is processed.
Scenario1:
Additional request hits IIS for site A. New AppDomain is created and in this new AppDomain HttpApplication is created OR HttpApplication is created in the 1st AppDomain(that was created for 1st Request)?

Scenario2:
Additional request hits IIS BUT for site B. New AppDomain is created and in this new AppDomain HttpApplication is created OR HttpApplication is created in the 1st AppDomain(that was created for 1st Request)?

Thank you

推荐答案

那是一个很好的问题.我会尝试回答这两种情况.
Thats a very good Questtion. I''ll try to answer both the scenario.
TheAteist写道:
TheAteist wrote:

其他请求命中了站点A的IIS.创建了新的AppDomain,并在此新的AppDomain中创建了HttpApplication或在第一个中创建了HttpApplication. AppDomain(为第一个请求创建的)

Additional request hits IIS for site A. New AppDomain is created and in this new AppDomain HttpApplication is created OR HttpApplication is created in the 1st AppDomain(that was created for 1st Request)



如果应用程序域已经存在,那么它将也用于其他请求.相同的HttpApplication类可以用于多个请求.




If application domain is already there, then it will be used for other request as well.Same HttpApplication class can be used for multiple request.


TheAteist写道:
TheAteist wrote:

其他请求将针对站点B的IIS BUT.创建新的AppDomain,并在此新的AppDomain中创建HttpApplication或在HttpApplication中创建HttpApplication.第一个AppDomain(为第一个请求创建的)?

Additional request hits IIS BUT for site B. New AppDomain is created and in this new AppDomain HttpApplication is created OR HttpApplication is created in the 1st AppDomain(that was created for 1st Request)?



不,HTTPApplication被限制在应用程序域中.一个站点的HTTPApplication对象不能被另一个站点使用.



No, HTTPApplication is confined into app domain. HTTPApplication object of one site cannot be used by another website.


这篇关于应用程序域和要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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