Concept about appdomain,application pool,worker process

webapplication---->appdomain

one webapp--->means one appdomain

both application pool and appdomain provide isolation, but use different approach.

application pool use process without .net.

appdomain should use .net.

If your server host thousands of web sites, you wont use thousands of the application pool to isolate the web sites, just becuase, too many processes running will kill the os.

You can assign several applications to the same application pool if all the applications use the same configuration settings. For example, applications that use the same worker process recycling settings or ASP.NET version can run in the same application pool. However, if you have an application that must run with unique settings, you should create a separate application pool for that application.

http://technet.microsoft.com/en-us/library/cc731755%28v=ws.10%29.aspx

http://technet.microsoft.com/en-us/library/cc732742%28v=ws.10%29.aspx

Stopping an application pool causes the Windows Process Activation Service (WAS) to shut down all running worker processes serving that application pool. WAS does not restart these worker processes. An administrator must restart all stopped application pools. All applications routed to a stopped application pool receive 503 Service Unavailable errors.

http://technet.microsoft.com/en-us/library/cc753449%28v=ws.10%29.aspx

An application pool is a group of one or more URLs that are served by a worker process or a set of worker processes. Application pools set boundaries for the applications they contain, which means that any applications that are running outside a given application pool cannot affect the applications in the application pool.

Application pools offer the following benefits:

  • Improved server and application performance. You can assign resource-intensive applications to their own application pools so that the performance of other applications does not decrease.

  • Improved application availability. If an application in one application pool fails, applications in other application pools are not affected.

  • Improved security. By isolating applications, you reduce the chance that one application will access the resources of another application.

In IIS 7, application pools run in one of two modes: integrated mode and classic mode. The application pool mode affects how the server processes requests for managed code. If a managed application runs in an application pool with integrated mode, the server will use the integrated, request-processing pipelines of IIS and ASP.NET to process the request. However, if a managed application runs in an application pool with classic mode, the server will continue to route requests for managed code through Aspnet_isapi.dll, processing requests the same as if the application was running in IIS 6.0.

Most managed applications should run successfully in application pools with integrated mode, but you may have to run in classic mode for compatibility reasons. Test the applications that are running in integrated mode first to determine whether you really need classic mode.

http://www.cnblogs.com/awpatp/archive/2009/12/31/1636930.html

http://social.msdn.microsoft.com/Forums/en-US/clr/thread/fd865e35-a2ee-41b8-b112-5913f15c96f2

 http://music.573114.com/Blog/Html/DB0D/716464.html

http://www.th7.cn/Program/net/201304/132182.shtml

http://msdn.microsoft.com/en-us/library/aa544790%28v=CS.70%29.aspx

http://msdn.microsoft.com/en-us/library/aa560164%28v=bts.80%29.aspx

 http://www.th7.cn/article/bc/nt/200909/20090906235516.html

http://www.cnblogs.com/whqhoo/archive/2009/02/20/1246774.html

 http://www.th7.cn/Program/net/201304/132182.shtml

http://music.573114.com/Blog/Html/DB0D/716464.html

ASP.NET&IIS7高级编程

http://www1.huachu.com.cn/read/readbookinfo.asp?sectionid=1000000545

http://www1.huachu.com.cn/read/readbookinfo.asp?sectionid=1000000545

http://blogs.msdn.com/b/carmelop/archive/2013/03/22/how-many-web-applications-per-application-pool.aspx

原文地址:https://www.cnblogs.com/daishuguang/p/3072518.html