什么是 IIS 和 Asp.Net 中的应用程序池? [英] What is Application Pool in IIS and Asp.Net?

查看:30
本文介绍了什么是 IIS 和 Asp.Net 中的应用程序池?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用程序池在 IIS 中是如何实现的?

How is application pool implemented in IIS?

  1. 每个应用程序池是否都相当于一个 .Net AppDomain?
  2. 或者它相当于一个 .Net 进程?
  3. 应用程序池与 IIS w3wp.exe 有何关联?

推荐答案

1.每个应用程序池是否相当于一个 .Net AppDomain?

1 . Is each application pool equivalent to a .Net AppDomain?

不,一个应用程序池可能有多个 AppDomain.每个 AppDomain 代表一个正在运行的 ASP.NET 应用程序.许多 ASP.NET 应用程序可能属于一个应用程序池.

No, an application pool may have several AppDomains. Each AppDomain represents a single running ASP.NET Application. Many ASP.NET Applications may belong to a single Application Pool.

2.还是相当于一个.Net进程?

2 . Or it is a equivalent to a .Net process?

不完全是.见下文.

3.应用程序池与 IIS w3wp.exe 有什么关系?

3 . How is Application pool related to IIS w3wp.exe?

应用程序池代表数量有限的工作进程,这些进程可能承载更多的应用程序.这类似于 SQL 连接池如何在任意数量的请求之间共享有限数量的连接.

An application pool represents a limited number of worker processes that may host a potentially larger number of applications. This is similar to how a SQL Connection Pool shares a limited number of connections among an arbitrary number of requests.

默认情况下,应用程序池有一个工作进程 (w3wp.exe),通常最好不要理会这个设置,除非您知道自己在做什么.不过,应用程序池可以配置为使用任意数量的进程.

By default, an Application Pool gets one Worker Process (w3wp.exe), and it's usually best to leave this setting alone unless you know what you're doing. Still, an Application Pool can be configured to use any number of processes.

工作进程实际上是这里汇集的资源,而不是 AppDomain.AppDomain 的数量总是与 ASP.NET 应用程序的数量相同(除非一个正在关闭,或者应用程序创建了自己的 AppDomains),但 Worker Process 的数量是独立的;应用程序池为您提供特定数量的工作进程来处理特定数量的 AppDomain 的请求.

The Worker Process is actually the resource that's being pooled here, not the AppDomain. There will always be the same number of AppDomains as there are ASP.NET Applications (unless one is in the middle of shutting down, or an application creates its own AppDomains), but the number of Worker Processes is independent; an Application Pool gives you a specific number of Worker Processes to handle requests for a specific number of AppDomains.

应用程序池中的工作进程数设置为 1(默认值)意味着池中的所有应用程序/应用程序域共享同一个工作进程.

A setting of 1 (the default) for the number of worker processes in an App Pool means that all Applications/AppDomains in the pool share the same worker process.

这篇关于什么是 IIS 和 Asp.Net 中的应用程序池?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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