<modules runAllManagedModulesForAllRequests="true";/>意义 [英] <modules runAllManagedModulesForAllRequests="true" /> Meaning

查看:130
本文介绍了<modules runAllManagedModulesForAllRequests="true";/>意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是什么意思

<modules runAllManagedModulesForAllRequests="true" />

我使用的是 IIS 7.5 并且我有一个简单的 Web 应用程序.我需要在我的 web.config 文件中写这个吗?我还为 jquery ajax 调用编写了一些 http 处理程序.我正在使用表单身份验证和 asp.net 4.0.

I am using IIS 7.5 and I have a simple web application. Do I need to write this in my web.config file. I have also written few http handler for jquery ajax call. I am using form authentication and asp.net 4.0.

如何确定我必须运行哪些模块,哪些不应该运行?

How can I determine which module I have to run and which is not to be?

推荐答案

模块先决条件:

IIS 核心引擎使用先决条件来确定何时启用特定模块.例如,性能原因可能决定您只想为也转到托管处理程序的请求执行托管模块.以下示例中的先决条件 (precondition=managedHandler") 仅为也由托管处理程序处理的请求启用表单身份验证模块,例如对 .aspx 或 .asmx 文件的请求:

The IIS core engine uses preconditions to determine when to enable a particular module. Performance reasons, for example, might determine that you only want to execute managed modules for requests that also go to a managed handler. The precondition in the following example (precondition="managedHandler") only enables the forms authentication module for requests that are also handled by a managed handler, such as requests to .aspx or .asmx files:

<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" preCondition="managedHandler" />

如果删除属性 precondition="managedHandler",表单身份验证也适用于托管处理程序不提供的内容,例如 .html、.jpg、.doc,但也适用于经典的 ASP (.asp) 或 PHP (.php) 扩展.参见 "如何利用 IIS 集成管道"为所有内容启用 ASP.NET 模块的示例.

If you remove the attribute precondition="managedHandler", Forms Authentication also applies to content that is not served by managed handlers, such as .html, .jpg, .doc, but also for classic ASP (.asp) or PHP (.php) extensions. See "How to Take Advantage of IIS Integrated Pipeline" for an example of enabling ASP.NET modules to run for all content.

无论managedHandler"如何,您还可以使用快捷方式启用所有托管 (ASP.NET) 模块以针对应用程序中的所有请求运行.前提条件.

You can also use a shortcut to enable all managed (ASP.NET) modules to run for all requests in your application, regardless of the "managedHandler" precondition.

使所有托管模块能够针对所有请求运行,而无需配置每个模块条目以删除managedHandler";先决条件,使用 部分中的 runAllManagedModulesForAllRequests 属性:

To enable all managed modules to run for all requests without configuring each module entry to remove the "managedHandler" precondition, use the runAllManagedModulesForAllRequests property in the <modules> section:

<modules runAllManagedModulesForAllRequests="true" />    

当您使用此属性时,managedHandler"前提条件无效,所有托管模块针对所有请求运行.

When you use this property, the "managedHandler" precondition has no effect and all managed modules run for all requests.

复制自 IIS 模块概述:先决条件

这篇关于&lt;modules runAllManagedModulesForAllRequests="true";/&gt;意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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