IIS7中的DefaultAppPool和Classic .NET AppPool有什么区别? [英] What is the difference between DefaultAppPool and Classic .NET AppPool in IIS7?

查看:1999
本文介绍了IIS7中的DefaultAppPool和Classic .NET AppPool有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a problem with timeouts in IIS. In the web.config the session timeout was set to 60 minutes but after 20 minutes the session ends.

此问题仅发生在IIS7中而不发生在IIS5中。

This problem only occurs in IIS7 and not in IIS5.

经过一番调查后,我发现它已到期到应用程序池的超时。如果应用程序池没有做任何事情就离开了20分钟,IIS就会结束会话。

After some investigation, I discovered it was due to the application pool's timeout. If the App Pool is left 20 minutes without doing anything, IIS ends the session.

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

If the application is using the defaultAppPool this always happens but if I change the App Pool to the classic .NET App Pool, the timeout does not occur.

这两种模式都有空闲超时,但只发生了 ,这种情况发生了。

Both modes have idle timeout but only in the DefaultAppPool this occurs.


  • 这是为什么?

  • 经典.NET AppPool和DefaultAppPool有什么区别?

  • 管道有什么区别,经典和集成之间?

推荐答案

IIS7有一些重大改动以更好地支持WCF,其中一个关键部分是新的集成应用程序池。 PDC的这次会议从使WCF服务表现更好的角度讨论了其中的一些挑战: http:// channel9.msdn.com/pdc2008/TL38/

IIS7 has some major changes to better support WCF and one of the key pieces is the new integrated application pool. This session from PDC talks about some of these challenges from the perspective of making WCF services perform better: http://channel9.msdn.com/pdc2008/TL38/

此页面概述了IIS7架构: http://learn.iis.net/page.aspx/101/introduction-to-iis7-architecture/
我已经在下面的两个不同类型的应用程序池中包含了本文中的一些关键信息:

This page has a good overview of IIS7 architecture: http://learn.iis.net/page.aspx/101/introduction-to-iis7-architecture/. I've included some of the key information from this article on the purpose of the two different kinds of app pools below:


集成应用程序池模式

当应用程序池处于
集成模式时,您可以获得
的优势集成
IIS
和ASP.NET的请求处理体系结构。当
中的工作进程应用程序池收到
请求时,该请求将通过
有序事件列表。每个事件
调用必要的本机和托管
模块来处理
请求的部分并生成响应。
在集成模式下运行
应用程序池有几个好处。
首先,
IIS和ASP.NET的请求处理模型被集成到
统一流程模型中。此模型
消除了之前在IIS和ASP.NET中重复
的步骤,例如
身份验证。此外,
集成模式使托管功能的
可用性达到
所有内容类型。

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
模式时,IIS 7.0处理请求,如
IIS 6.0工作进程隔离模式。
ASP.NET请求首先在IIS中执行
本机处理步骤,然后将
路由到Aspnet_isapi.dll,以便在
托管运行时中对
处理托管代码进行处理。最后,请求
通过IIS路由回来发送
响应。 IIS
和ASP.NET请求处理模型
的这种分离导致重复一些
处理步骤,例如
身份验证和授权。
此外,托管代码功能,
,例如表单身份验证,只有
可用于ASP.NET应用程序或
应用程序,您有脚本
将所有请求映射到由
aspnet_isapi.dll处理。在将生产
环境升级到IIS 7.0并将
应用程序分配给$ b $中的应用程序池之前,请务必在集成模式
中测试
现有应用程序的
兼容性b集成模式。如果应用程序
无法在集成模式下工作,则应仅在经典模式下将
应用程序添加到应用程序池
。对于
示例,您的应用程序可能依赖

IIS传递到托管运行时的身份验证令牌,并且,对于IIS 7.0中的新架构,

该过程会破坏您的申请。

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.

这篇关于IIS7中的DefaultAppPool和Classic .NET AppPool有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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