gpt4 book ai didi

iis - IIS7 中的 DefaultAppPool 和经典 .NET AppPool 有什么区别?

转载 作者:行者123 更新时间:2023-12-01 20:24:23 24 4
gpt4 key购买 nike

我在 IIS 中遇到超时问题。在 web.config 中, session 超时设置为 60 分钟,但 20 分钟后 session 结束。

此问题仅出现在 IIS7 中,不会出现在 IIS5 中。

经过一番调查,我发现这是由于应用程序池超时造成的。如果应用程序池有 20 分钟没有执行任何操作,IIS 将结束 session 。

如果应用程序使用 defaultAppPool,这种情况总是会发生,但如果我将应用程序池更改为经典的 .NET 应用程序池,则不会发生超时。

两种模式都有空闲超时,但在 DefaultAppPool 中发生这种情况。

  • 这是为什么?
  • 经典 .NET AppPool 和 DefaultAppPool 之间有什么区别?
  • 经典和集成的流程有何区别?

最佳答案

IIS7 进行了一些重大更改,以更好地支持 WCF,其中关键部分之一是新的集成应用程序池。 PDC 的本次 session 从使 WCF 服务性能更好的角度讨论了其中一些挑战:http://channel9.msdn.com/pdc2008/TL38/

此页面很好地概述了 IIS7 架构: http://learn.iis.net/page.aspx/101/introduction-to-iis7-architecture/ 。我在本文中提供了一些有关以下两种不同类型应用程序池用途的关键信息:

Integrated application pool mode

When an application pool is in Integrated mode, you can take advantage of the integrated request-processing architecture of IIS and ASP.NET. When a worker process in an application pool receives a request, the request passes through an ordered list of events. Each event calls the necessary native and managed modules to process portions of the request and to generate the response. There are several benefits to running application pools in Integrated mode. First the request-processing models of IIS and ASP.NET are integrated into a unified process model. This model eliminates steps that were previously duplicated in IIS and ASP.NET, such as authentication. Additionally, Integrated mode enables the availability of managed features to all content types.

Classic application pool mode

When an application pool is in Classic mode, IIS 7.0 handles requests as in IIS 6.0 worker process isolation mode. ASP.NET requests first go through native processing steps in IIS and are then routed to Aspnet_isapi.dll for processing of managed code in the managed runtime. Finally, the request is routed back through IIS to send the response. This separation of the IIS and ASP.NET request-processing models results in duplication of some processing steps, such as authentication and authorization. Additionally, managed code features, such as forms authentication, are only available to ASP.NET applications or applications for which you have script mapped all requests to be handled by aspnet_isapi.dll. Be sure to test your existing applications for compatibility in Integrated mode before upgrading a production environment to IIS 7.0 and assigning applications to application pools in Integrated mode. You should only add an application to an application pool in Classic mode if the application fails to work in Integrated mode. For example, your application might rely on an authentication token passed from IIS to the managed runtime, and, due to the new architecture in IIS 7.0, the process breaks your application.

关于iis - IIS7 中的 DefaultAppPool 和经典 .NET AppPool 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/759304/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com