&所述;模块runAllManagedModulesForAllRequests = QUOT;真" />含义 [英] <modules runAllManagedModulesForAllRequests="true" /> Meaning

查看:329
本文介绍了&所述;模块runAllManagedModulesForAllRequests = QUOT;真" />含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是什么意思

<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?

感谢。

推荐答案

模块preconditions:

在IIS核心引擎使用preconditions以确定何时启动一个特定的模块。性能方面的原因,例如,可能会确定您只需要执行管理模块请求也去托管处理程序。在下面的例子中的precondition( 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)扩展。请参见<一个href=\"http://www.iis.net/learn/application-frameworks/building-and-running-aspnet-applications/how-to-take-advantage-of-the-iis-integrated-pipeline\">How采取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.

您也可以使用快捷方式,使所有托管(ASP.NET)模块,为您的应用程序的所有请求运行,无论 managedHandler precondition。

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 precondition,使用<$ C运行$ C> runAllManagedModulesForAllRequests 在属性中的&LT;模块&gt; 部分:

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 precondition没有任何作用,所有的管理模块运行的所有请求。

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

从<复制的href=\"http://www.iis.net/learn/get-started/introduction-to-iis/iis-modules-overview#$p$pcondition\">IIS模块概述:preconditions

这篇关于&所述;模块runAllManagedModulesForAllRequests = QUOT;真&QUOT; /&GT;含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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