HttpApplication HttpApplication HttpApplication HttpApplication Class

Definición

Define los métodos, las propiedades y los eventos comunes a todos los objetos de aplicación de una aplicación ASP.NET.Defines the methods, properties, and events that are common to all application objects in an ASP.NET application. Esta clase es la clase base para las aplicaciones que están definidas por el usuario en el archivo Global.asax.This class is the base class for applications that are defined by the user in the Global.asax file.

public ref class HttpApplication : IDisposable, System::ComponentModel::IComponent, System::Web::IHttpAsyncHandler
public class HttpApplication : IDisposable, System.ComponentModel.IComponent, System.Web.IHttpAsyncHandler
type HttpApplication = class
    interface IComponent
    interface IDisposable
    interface IHttpAsyncHandler
    interface IHttpHandler
Public Class HttpApplication
Implements IComponent, IDisposable, IHttpAsyncHandler
Herencia
HttpApplicationHttpApplicationHttpApplicationHttpApplication
Implementaciones

Ejemplos

En los dos ejemplos siguientes se muestra cómo usar HttpApplication la clase y sus eventos.The following two examples demonstrate how to use the HttpApplication class and its events. En el primer ejemplo se muestra cómo crear un módulo HTTP personalizado y cómo conectar un evento a él.The first example demonstrates how to create a custom HTTP module and connect an event to it. En el segundo ejemplo se muestra cómo modificar el archivo Web. config.The second example demonstrates how to modify the Web.config file.

En el ejemplo siguiente se muestra cómo crear un módulo HTTP personalizado y cómo AcquireRequestState conectar el evento al módulo http.The following example demonstrates how to create a custom HTTP module and connect the AcquireRequestState event to the HTTP module. Los módulos HTTP interceptan cada solicitud a los recursos de la aplicación Web, lo que permite filtrar las solicitudes de los clientes.HTTP modules intercept each request to Web application resources, thereby allowing you to filter client requests. Cualquier módulo HTTP que se suscribe a un HttpApplication evento debe implementar la IHttpModule interfaz.Any HTTP module that subscribes to an HttpApplication event must implement the IHttpModule interface.

using System;
using System.Web;

namespace Samples.AspNet.CS
{
    public class CustomHTTPModule : IHttpModule
    {
        public CustomHTTPModule()
        {
            // Class constructor.
        }

        // Classes that inherit IHttpModule 
        // must implement the Init and Dispose methods.
        public void Init(HttpApplication app)
        {

            app.AcquireRequestState += new EventHandler(app_AcquireRequestState);
			app.PostAcquireRequestState += new EventHandler(app_PostAcquireRequestState);
		}

        public void Dispose()
        {
            // Add code to clean up the
            // instance variables of a module.
        }

        // Define a custom AcquireRequestState event handler.
        public void app_AcquireRequestState(object o, EventArgs ea)
        {
            HttpApplication httpApp = (HttpApplication)o;
            HttpContext ctx = HttpContext.Current;
            ctx.Response.Write(" Executing AcquireRequestState ");
        }

        // Define a custom PostAcquireRequestState event handler.
		public void app_PostAcquireRequestState(object o, EventArgs ea)
		{
			HttpApplication httpApp = (HttpApplication)o;
			HttpContext ctx = HttpContext.Current;
			ctx.Response.Write(" Executing PostAcquireRequestState ");
		}

	}
}
Imports System.Web

Namespace Samples.AspNet.VB
    Public Class CustomHTTPModule
        Implements IHttpModule

        Public Sub New()

            ' Class constructor.

        End Sub


        ' Classes that inherit IHttpModule 
        ' must implement the Init and Dispose methods.
        Public Sub Init(ByVal app As HttpApplication) Implements IHttpModule.Init

            AddHandler app.AcquireRequestState, AddressOf app_AcquireRequestState
            AddHandler app.PostAcquireRequestState, AddressOf app_PostAcquireRequestState

        End Sub


        Public Sub Dispose() Implements IHttpModule.Dispose

            ' Add code to clean up the
            ' instance variables of a module.

        End Sub


        ' Define a custom AcquireRequestState event handler.
        Public Sub app_AcquireRequestState(ByVal o As Object, ByVal ea As EventArgs)

            Dim httpApp As HttpApplication = CType(o, HttpApplication)
            Dim ctx As HttpContext = HttpContext.Current
            ctx.Response.Write(" Executing AcquireRequestState ")

        End Sub

        ' Define a custom PostAcquireRequestState event handler.
        Public Sub app_PostAcquireRequestState(ByVal o As Object, ByVal ea As EventArgs)

            Dim httpApp As HttpApplication = CType(o, HttpApplication)
            Dim ctx As HttpContext = HttpContext.Current
            ctx.Response.Write(" Executing PostAcquireRequestState ")

        End Sub

    End Class

End Namespace

Antes de que se pueda producir un evento en un módulo HTTP personalizado, debe modificar los valores de configuración en el archivo Web. config para notificar a ASP.NET sobre el módulo HTTP.Before an event in a custom HTTP module can occur, you must modify the configuration settings in the Web.config file to notify ASP.NET about the HTTP module. En el ejemplo siguiente se muestra el valor de configuración httpModules adecuado en la sección del archivo Web. config.The following example shows the appropriate configuration setting in the httpModules section of the Web.config file. La configuración siguiente se aplica al modo clásico de IIS 7,0 y a versiones anteriores de IIS.The following setting applies to IIS 7.0 Classic mode and to earlier versions of IIS.

<configuration>  
  <system.web>  
    <httpModules>  
      <add type="Samples.AspNet.CS.CustomHTTPModule"  
        name="CustomHttpModule" />  
      </httpModules>  
  </system.web>  
</configuration>  
<configuration>  
  <system.web>  
    <httpModules>  
      <add type="Samples.AspNet.VB.CustomHTTPModule"  
        name="CustomHttpModule" />  
      </httpModules>  
  </system.web>  
</configuration>  

La configuración siguiente se aplica al modo integrado de IIS 7,0.The following setting applies to IIS 7.0 Integrated mode.

<configuration>  
  <system.webServer>  
    <modules>  
      <add type="Samples.AspNet.CS.CustomHTTPModule"  
        name="CustomHttpModule" />  
      </modules>  
  </system.webServer>  
</configuration>  
<configuration>  
  <system.webServer>  
    <modules>  
      <add type="Samples.AspNet.VB.CustomHTTPModule"  
        name="CustomHttpModule" />  
      <modules>  
  </system.webServer>  
</configuration>  

Comentarios

Las instancias de HttpApplication la clase se crean en la infraestructura de ASP.net, no directamente por el usuario.Instances of the HttpApplication class are created in the ASP.NET infrastructure, not by the user directly. Se utiliza una instancia HttpApplication de la clase para procesar muchas solicitudes en su duración.One instance of the HttpApplication class is used to process many requests in its lifetime. Sin embargo, solo puede procesar una solicitud a la vez.However, it can process only one request at a time. Por lo tanto, las variables miembro se pueden usar para almacenar datos por solicitud.Thus, member variables can be used to store per-request data.

Una aplicación genera eventos que se pueden controlar mediante módulos personalizados que implementan IHttpModule la interfaz o el código del controlador de eventos que se define en el archivo global. asax.An application raises events that can be handled by custom modules that implement the IHttpModule interface or by event handler code that is defined in the Global.asax file. Los módulos personalizados que implementan la IHttpModule interfaz se pueden colocar en la carpeta App_Code o en una DLL de la carpeta bin.Custom modules that implement the IHttpModule interface can be put in the App_Code folder or in a DLL in the Bin folder.

HttpApplicationse incluye en la versión .NET Framework 3,5.HttpApplication is introduced in the .NET Framework version 3.5. Para más información, vea Versiones y dependencias.For more information, see Versions and Dependencies.

Nota

Al ejecutar IIS 7,0 en modo integrado, los módulos personalizados de la carpeta App_Code o la carpeta bin se aplican a todas las solicitudes de la canalización de solicitudes.When running IIS 7.0 in Integrated mode, custom modules in the App_Code folder or Bin folder apply to all requests in the request pipeline. El código del controlador de eventos del archivo global. asax solo se aplica a las solicitudes que se asignan a un controlador ASP.NET.Event handler code in the Global.asax file only applies to requests that are mapped to an ASP.NET handler.

Los eventos de la aplicación se generan en el orden siguiente:The application events are raised in the following order:

  1. BeginRequest

  2. AuthenticateRequest

  3. PostAuthenticateRequest

  4. AuthorizeRequest

  5. PostAuthorizeRequest

  6. ResolveRequestCache

  7. PostResolveRequestCache

    Después del PostResolveRequestCache evento y antes del PostMapRequestHandler evento, se crea un controlador de eventos (que es una página que se corresponde con la dirección URL de la solicitud).After the PostResolveRequestCache event and before the PostMapRequestHandler event, an event handler (which is a page that corresponds to the request URL) is created. Cuando un servidor ejecuta IIS 7,0 en modo integrado y al menos el .NET Framework versión 3,0, se genera MapRequestHandler el evento.When a server is running IIS 7.0 in Integrated mode and at least the .NET Framework version 3.0, the MapRequestHandler event is raised. Cuando un servidor ejecuta IIS 7,0 en modo clásico o en una versión anterior de IIS, no se puede controlar este evento.When a server is running IIS 7.0 in Classic mode or an earlier version of IIS, this event cannot be handled.

  8. PostMapRequestHandler

  9. AcquireRequestState

  10. PostAcquireRequestState

  11. PreRequestHandlerExecute

    Se ejecuta el controlador de eventos.The event handler is executed.

  12. PostRequestHandlerExecute

  13. ReleaseRequestState

  14. PostReleaseRequestState

    Una vez PostReleaseRequestState generado el evento, los filtros de respuesta existentes filtrarán la salida.After the PostReleaseRequestState event is raised, any existing response filters will filter the output.

  15. UpdateRequestCache

  16. PostUpdateRequestCache

  17. LogRequest.LogRequest.

    Este evento es compatible con el modo integrado de IIS 7,0 y al menos el .NET Framework 3,0This event is supported in IIS 7.0 Integrated mode and at least the .NET Framework 3.0

  18. PostLogRequest

    Este evento es compatible con el modo integrado de IIS 7,0 y al menos el .NET Framework 3,0This event is supported IIS 7.0 Integrated mode and at least the .NET Framework 3.0

  19. EndRequest

Constructores

HttpApplication() HttpApplication() HttpApplication() HttpApplication()

Inicializa una nueva instancia de la clase HttpApplication.Initializes a new instance of the HttpApplication class.

Propiedades

Application Application Application Application

Obtiene el estado actual de una aplicación.Gets the current state of an application.

Context Context Context Context

Obtiene información específica de HTTP acerca de la solicitud actual.Gets HTTP-specific information about the current request.

Events Events Events Events

Obtiene la lista de delegados de controladores de eventos que procesan todos los eventos de aplicación.Gets the list of event handler delegates that process all application events.

Modules Modules Modules Modules

Obtiene la colección de módulos de la aplicación actual.Gets the collection of modules for the current application.

Request Request Request Request

Obtiene el objeto de solicitud intrínseco de la solicitud actual.Gets the intrinsic request object for the current request.

Response Response Response Response

Obtiene el objeto de respuesta intrínseco de la solicitud actual.Gets the intrinsic response object for the current request.

Server Server Server Server

Obtiene el objeto de servidor intrínseco de la solicitud actual.Gets the intrinsic server object for the current request.

Session Session Session Session

Obtiene el objeto de sesión intrínseco que proporciona acceso a los datos de la sesión.Gets the intrinsic session object that provides access to session data.

Site Site Site Site

Obtiene o establece una interfaz de sitio para una implementación de IComponent.Gets or sets a site interface for an IComponent implementation.

User User User User

Obtiene el objeto de usuario intrínseco de la respuesta actual.Gets the intrinsic user object for the current request.

Métodos

AddOnAcquireRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnAcquireRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnAcquireRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnAcquireRequestStateAsync(BeginEventHandler, EndEventHandler)

Agrega el evento AcquireRequestState especificado a la colección de controladores de eventos AcquireRequestState asincrónicos de la solicitud actual.Adds the specified AcquireRequestState event to the collection of asynchronous AcquireRequestState event handlers for the current request.

AddOnAcquireRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnAcquireRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnAcquireRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnAcquireRequestStateAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento AcquireRequestState especificado a la colección de controladores de eventos AcquireRequestState asincrónicos de la solicitud actual.Adds the specified AcquireRequestState event to the collection of asynchronous AcquireRequestState event handlers for the current request.

AddOnAuthenticateRequestAsync(BeginEventHandler, EndEventHandler) AddOnAuthenticateRequestAsync(BeginEventHandler, EndEventHandler) AddOnAuthenticateRequestAsync(BeginEventHandler, EndEventHandler) AddOnAuthenticateRequestAsync(BeginEventHandler, EndEventHandler)

Agrega el evento AuthenticateRequest especificado a la colección de controladores de eventos AuthenticateRequest asincrónicos de la solicitud actual.Adds the specified AuthenticateRequest event to the collection of asynchronous AuthenticateRequest event handlers for the current request.

AddOnAuthenticateRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnAuthenticateRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnAuthenticateRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnAuthenticateRequestAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento AuthenticateRequest especificado a la colección de controladores de eventos AuthenticateRequest asincrónicos de la solicitud actual.Adds the specified AuthenticateRequest event to the collection of asynchronous AuthenticateRequest event handlers for the current request.

AddOnAuthorizeRequestAsync(BeginEventHandler, EndEventHandler) AddOnAuthorizeRequestAsync(BeginEventHandler, EndEventHandler) AddOnAuthorizeRequestAsync(BeginEventHandler, EndEventHandler) AddOnAuthorizeRequestAsync(BeginEventHandler, EndEventHandler)

Agrega el evento AuthorizeRequest especificado a la colección de controladores de eventos AuthorizeRequest asincrónicos de la solicitud actual.Adds the specified AuthorizeRequest event to the collection of asynchronous AuthorizeRequest event handlers for the current request.

AddOnAuthorizeRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnAuthorizeRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnAuthorizeRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnAuthorizeRequestAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento AuthorizeRequest especificado a la colección de controladores de eventos AuthorizeRequest asincrónicos de la solicitud actual.Adds the specified AuthorizeRequest event to the collection of asynchronous AuthorizeRequest event handlers for the current request.

AddOnBeginRequestAsync(BeginEventHandler, EndEventHandler) AddOnBeginRequestAsync(BeginEventHandler, EndEventHandler) AddOnBeginRequestAsync(BeginEventHandler, EndEventHandler) AddOnBeginRequestAsync(BeginEventHandler, EndEventHandler)

Agrega el evento BeginRequest especificado a la colección de controladores de eventos BeginRequest asincrónicos de la solicitud actual.Adds the specified BeginRequest event to the collection of asynchronous BeginRequest event handlers for the current request.

AddOnBeginRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnBeginRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnBeginRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnBeginRequestAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento BeginRequest especificado a la colección de controladores de eventos BeginRequest asincrónicos de la solicitud actual.Adds the specified BeginRequest event to the collection of asynchronous BeginRequest event handlers for the current request.

AddOnEndRequestAsync(BeginEventHandler, EndEventHandler) AddOnEndRequestAsync(BeginEventHandler, EndEventHandler) AddOnEndRequestAsync(BeginEventHandler, EndEventHandler) AddOnEndRequestAsync(BeginEventHandler, EndEventHandler)

Agrega el evento EndRequest especificado a la colección de controladores de eventos EndRequest asincrónicos de la solicitud actual.Adds the specified EndRequest event to the collection of asynchronous EndRequest event handlers for the current request.

AddOnEndRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnEndRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnEndRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnEndRequestAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento EndRequest especificado a la colección de controladores de eventos EndRequest asincrónicos de la solicitud actual.Adds the specified EndRequest event to the collection of asynchronous EndRequest event handlers for the current request.

AddOnLogRequestAsync(BeginEventHandler, EndEventHandler) AddOnLogRequestAsync(BeginEventHandler, EndEventHandler) AddOnLogRequestAsync(BeginEventHandler, EndEventHandler) AddOnLogRequestAsync(BeginEventHandler, EndEventHandler)

Agrega el evento LogRequest especificado a la colección de controladores de eventos LogRequest asincrónicos de la solicitud actual.Adds the specified LogRequest event to the collection of asynchronous LogRequest event handlers for the current request.

AddOnLogRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnLogRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnLogRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnLogRequestAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento LogRequest especificado a la colección de controladores de eventos LogRequest asincrónicos de la solicitud actual.Adds the specified LogRequest event to the collection of asynchronous LogRequest event handlers for the current request.

AddOnMapRequestHandlerAsync(BeginEventHandler, EndEventHandler) AddOnMapRequestHandlerAsync(BeginEventHandler, EndEventHandler) AddOnMapRequestHandlerAsync(BeginEventHandler, EndEventHandler) AddOnMapRequestHandlerAsync(BeginEventHandler, EndEventHandler)

Agrega el evento MapRequestHandler especificado a la colección de controladores de eventos MapRequestHandler asincrónicos de la solicitud actual.Adds the specified MapRequestHandler event to the collection of asynchronous MapRequestHandler event handlers for the current request.

AddOnMapRequestHandlerAsync(BeginEventHandler, EndEventHandler, Object) AddOnMapRequestHandlerAsync(BeginEventHandler, EndEventHandler, Object) AddOnMapRequestHandlerAsync(BeginEventHandler, EndEventHandler, Object) AddOnMapRequestHandlerAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento MapRequestHandler especificado a la colección de controladores de eventos MapRequestHandler asincrónicos de la solicitud actual.Adds the specified MapRequestHandler event to the collection of asynchronous MapRequestHandler event handlers for the current request.

AddOnPostAcquireRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnPostAcquireRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnPostAcquireRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnPostAcquireRequestStateAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PostAcquireRequestState especificado a la colección de controladores de eventos PostAcquireRequestState asincrónicos de la solicitud actual.Adds the specified PostAcquireRequestState event to the collection of asynchronous PostAcquireRequestState event handlers for the current request.

AddOnPostAcquireRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostAcquireRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostAcquireRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostAcquireRequestStateAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento PostAcquireRequestState especificado a la colección de controladores de eventos PostAcquireRequestState asincrónicos de la solicitud actual.Adds the specified PostAcquireRequestState event to the collection of asynchronous PostAcquireRequestState event handlers for the current request.

AddOnPostAuthenticateRequestAsync(BeginEventHandler, EndEventHandler) AddOnPostAuthenticateRequestAsync(BeginEventHandler, EndEventHandler) AddOnPostAuthenticateRequestAsync(BeginEventHandler, EndEventHandler) AddOnPostAuthenticateRequestAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PostAuthenticateRequest especificado a la colección de controladores de eventos PostAuthenticateRequest asincrónicos de la solicitud actual.Adds the specified PostAuthenticateRequest event to the collection of asynchronous PostAuthenticateRequest event handlers for the current request.

AddOnPostAuthenticateRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostAuthenticateRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostAuthenticateRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostAuthenticateRequestAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento PostAuthorizeRequest especificado a la colección de controladores de eventos PostAuthorizeRequest asincrónicos de la solicitud actual.Adds the specified PostAuthorizeRequest event to the collection of asynchronous PostAuthorizeRequest event handlers for the current request.

AddOnPostAuthorizeRequestAsync(BeginEventHandler, EndEventHandler) AddOnPostAuthorizeRequestAsync(BeginEventHandler, EndEventHandler) AddOnPostAuthorizeRequestAsync(BeginEventHandler, EndEventHandler) AddOnPostAuthorizeRequestAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PostAuthorizeRequest especificado a la colección de controladores de eventos PostAuthorizeRequest asincrónicos de la solicitud actual.Adds the specified PostAuthorizeRequest event to the collection of asynchronous PostAuthorizeRequest event handlers for the current request.

AddOnPostAuthorizeRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostAuthorizeRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostAuthorizeRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostAuthorizeRequestAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el PostAuthorizeRequest especificado a la colección de controladores de eventos PostAuthorizeRequest asincrónicos de la solicitud actual.Adds the specified PostAuthorizeRequest to the collection of asynchronous PostAuthorizeRequest event handlers for the current request.

AddOnPostLogRequestAsync(BeginEventHandler, EndEventHandler) AddOnPostLogRequestAsync(BeginEventHandler, EndEventHandler) AddOnPostLogRequestAsync(BeginEventHandler, EndEventHandler) AddOnPostLogRequestAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PostLogRequest especificado a la colección de controladores de eventos PostLogRequest asincrónicos de la solicitud actual.Adds the specified PostLogRequest event to the collection of asynchronous PostLogRequest event handlers for the current request.

AddOnPostLogRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostLogRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostLogRequestAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostLogRequestAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento PostLogRequest especificado a la colección de controladores de eventos PostLogRequest asincrónicos de la solicitud actual.Adds the specified PostLogRequest event to the collection of asynchronous PostLogRequest event handlers for the current request.

AddOnPostMapRequestHandlerAsync(BeginEventHandler, EndEventHandler) AddOnPostMapRequestHandlerAsync(BeginEventHandler, EndEventHandler) AddOnPostMapRequestHandlerAsync(BeginEventHandler, EndEventHandler) AddOnPostMapRequestHandlerAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PostMapRequestHandler especificado a la colección de controladores de eventos PostMapRequestHandler asincrónicos de la solicitud actual.Adds the specified PostMapRequestHandler event to the collection of asynchronous PostMapRequestHandler event handlers for the current request.

AddOnPostMapRequestHandlerAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostMapRequestHandlerAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostMapRequestHandlerAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostMapRequestHandlerAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento PostMapRequestHandler especificado a la colección de controladores de eventos PostMapRequestHandler asincrónicos de la solicitud actual.Adds the specified PostMapRequestHandler event to the collection of asynchronous PostMapRequestHandler event handlers for the current request.

AddOnPostReleaseRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnPostReleaseRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnPostReleaseRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnPostReleaseRequestStateAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PostReleaseRequestState especificado a la colección de controladores de eventos PostReleaseRequestState asincrónicos de la solicitud actual.Adds the specified PostReleaseRequestState event to the collection of asynchronous PostReleaseRequestState event handlers for the current request.

AddOnPostReleaseRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostReleaseRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostReleaseRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostReleaseRequestStateAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento PostReleaseRequestState especificado a la colección de controladores de eventos PostReleaseRequestState asincrónicos de la solicitud actual.Adds the specified PostReleaseRequestState event to the collection of asynchronous PostReleaseRequestState event handlers for the current request.

AddOnPostRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler) AddOnPostRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler) AddOnPostRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler) AddOnPostRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PostRequestHandlerExecute especificado a la colección de controladores de eventos PostRequestHandlerExecute asincrónicos de la solicitud actual.Adds the specified PostRequestHandlerExecute event to the collection of asynchronous PostRequestHandlerExecute event handlers for the current request.

AddOnPostRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento PostRequestHandlerExecute especificado a la colección de controladores de eventos PostRequestHandlerExecute asincrónicos de la solicitud actual.Adds the specified PostRequestHandlerExecute event to the collection of asynchronous PostRequestHandlerExecute event handlers for the current request.

AddOnPostResolveRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnPostResolveRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnPostResolveRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnPostResolveRequestCacheAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PostResolveRequestCache especificado a la colección de controladores de eventos PostResolveRequestCache asincrónicos de la solicitud actual.Adds the specified PostResolveRequestCache event to the collection of asynchronous PostResolveRequestCache event handlers for the current request.

AddOnPostResolveRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostResolveRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostResolveRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostResolveRequestCacheAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento PostResolveRequestCache especificado a la colección de controladores de eventos PostResolveRequestCache asincrónicos de la solicitud actual.Adds the specified PostResolveRequestCache event to the collection of asynchronous PostResolveRequestCache event handlers for the current request.

AddOnPostUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnPostUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnPostUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnPostUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PostUpdateRequestCache especificado a la colección de controladores de eventos PostUpdateRequestCache asincrónicos de la solicitud actual.Adds the specified PostUpdateRequestCache event to the collection of asynchronous PostUpdateRequestCache event handlers for the current request.

AddOnPostUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnPostUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento PostUpdateRequestCache especificado a la colección de controladores de eventos PostUpdateRequestCache asincrónicos de la solicitud actual.Adds the specified PostUpdateRequestCache event to the collection of asynchronous PostUpdateRequestCache event handlers for the current request.

AddOnPreRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler) AddOnPreRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler) AddOnPreRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler) AddOnPreRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler)

Agrega el evento PreRequestHandlerExecute especificado a la colección de controladores de eventos PreRequestHandlerExecute asincrónicos de la solicitud actual.Adds the specified PreRequestHandlerExecute event to the collection of asynchronous PreRequestHandlerExecute event handlers for the current request.

AddOnPreRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler, Object) AddOnPreRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler, Object) AddOnPreRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler, Object) AddOnPreRequestHandlerExecuteAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento PreRequestHandlerExecute especificado a la colección de controladores de eventos PreRequestHandlerExecute asincrónicos de la solicitud actual.Adds the specified PreRequestHandlerExecute event to the collection of asynchronous PreRequestHandlerExecute event handlers for the current request.

AddOnReleaseRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnReleaseRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnReleaseRequestStateAsync(BeginEventHandler, EndEventHandler) AddOnReleaseRequestStateAsync(BeginEventHandler, EndEventHandler)

Agrega el evento ReleaseRequestState especificado a la colección de controladores de eventos ReleaseRequestState asincrónicos de la solicitud actual.Adds the specified ReleaseRequestState event to the collection of asynchronous ReleaseRequestState event handlers for the current request.

AddOnReleaseRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnReleaseRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnReleaseRequestStateAsync(BeginEventHandler, EndEventHandler, Object) AddOnReleaseRequestStateAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento ReleaseRequestState especificado a la colección de controladores de eventos ReleaseRequestState asincrónicos de la solicitud actual.Adds the specified ReleaseRequestState event to the collection of asynchronous ReleaseRequestState event handlers for the current request.

AddOnResolveRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnResolveRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnResolveRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnResolveRequestCacheAsync(BeginEventHandler, EndEventHandler)

Agrega el controlador de eventos ResolveRequestCache especificado a la colección de controladores de eventos ResolveRequestCache asincrónicos de la solicitud actual.Adds the specified ResolveRequestCache event handler to the collection of asynchronous ResolveRequestCache event handlers for the current request.

AddOnResolveRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnResolveRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnResolveRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnResolveRequestCacheAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el controlador de eventos ResolveRequestCache especificado a la colección de controladores de eventos ResolveRequestCache asincrónicos de la solicitud actual.Adds the specified ResolveRequestCache event handler to the collection of asynchronous ResolveRequestCache event handlers for the current request.

AddOnUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler) AddOnUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler)

Agrega el evento UpdateRequestCache especificado a la colección de controladores de eventos UpdateRequestCache asincrónicos de la solicitud actual.Adds the specified UpdateRequestCache event to the collection of asynchronous UpdateRequestCache event handlers for the current request.

AddOnUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler, Object) AddOnUpdateRequestCacheAsync(BeginEventHandler, EndEventHandler, Object)

Agrega el evento UpdateRequestCache especificado a la colección de controladores de eventos UpdateRequestCache asincrónicos de la solicitud actual.Adds the specified UpdateRequestCache event to the collection of asynchronous UpdateRequestCache event handlers for the current request.

CompleteRequest() CompleteRequest() CompleteRequest() CompleteRequest()

Permite que ASP.NET omita todos los eventos y el filtrado de la cadena de ejecución de canalización HTTP y ejecute directamente el evento EndRequest.Causes ASP.NET to bypass all events and filtering in the HTTP pipeline chain of execution and directly execute the EndRequest event.

Dispose() Dispose() Dispose() Dispose()

Se deshace de la instancia HttpApplication.Disposes the HttpApplication instance.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Inherited from Object)
GetOutputCacheProviderName(HttpContext) GetOutputCacheProviderName(HttpContext) GetOutputCacheProviderName(HttpContext) GetOutputCacheProviderName(HttpContext)

Obtiene el nombre del proveedor de caché de resultados predeterminado que se ha configurado para un sitio web.Gets the name of the default output-cache provider that is configured for a Web site.

GetType() GetType() GetType() GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Inherited from Object)
GetVaryByCustomString(HttpContext, String) GetVaryByCustomString(HttpContext, String) GetVaryByCustomString(HttpContext, String) GetVaryByCustomString(HttpContext, String)

Proporciona una implementación de la propiedad VaryByCustom para toda la aplicación.Provides an application-wide implementation of the VaryByCustom property.

Init() Init() Init() Init()

Ejecuta el código de inicialización personalizado una vez agregados todos los módulos controladores de eventos.Executes custom initialization code after all event handler modules have been added.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

(Inherited from Object)
OnExecuteRequestStep(Action<HttpContextBase,Action>) OnExecuteRequestStep(Action<HttpContextBase,Action>) OnExecuteRequestStep(Action<HttpContextBase,Action>) OnExecuteRequestStep(Action<HttpContextBase,Action>)

Especifica una devolución de llamada que se invocará cuando se complete un paso de ejecución de solicitud.Specifies a callback to invoke when a request execution step is executed.

RegisterModule(Type) RegisterModule(Type) RegisterModule(Type) RegisterModule(Type)

Registra un módulo de aplicación.Registers an application module.

ToString() ToString() ToString() ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Inherited from Object)

Eventos

AcquireRequestState AcquireRequestState AcquireRequestState AcquireRequestState

Se produce cuando ASP.NET adquiere el estado actual (por ejemplo, estado de sesión) asociado a la solicitud actual.Occurs when ASP.NET acquires the current state (for example, session state) that is associated with the current request.

AuthenticateRequest AuthenticateRequest AuthenticateRequest AuthenticateRequest

Se produce cuando un módulo de seguridad ha establecido la identidad del usuario.Occurs when a security module has established the identity of the user.

AuthorizeRequest AuthorizeRequest AuthorizeRequest AuthorizeRequest

Se produce cuando un módulo de seguridad ha comprobado la autorización del usuario.Occurs when a security module has verified user authorization.

BeginRequest BeginRequest BeginRequest BeginRequest

Se produce como el primer evento de la cadena de ejecución de canalización HTTP cuando ASP.NET responde a una solicitud.Occurs as the first event in the HTTP pipeline chain of execution when ASP.NET responds to a request.

Disposed Disposed Disposed Disposed

Se produce cuando se desecha la aplicación.Occurs when the application is disposed.

EndRequest EndRequest EndRequest EndRequest

Se produce como el último evento de la cadena de ejecución de canalización HTTP cuando ASP.NET responde a una solicitud.Occurs as the last event in the HTTP pipeline chain of execution when ASP.NET responds to a request.

Error Error Error Error

Se produce cuando se produce una excepción no controlada.Occurs when an unhandled exception is thrown.

LogRequest LogRequest LogRequest LogRequest

Se produce justo antes de que ASP.NET realice cualquier registro para la solicitud actual.Occurs just before ASP.NET performs any logging for the current request.

MapRequestHandler MapRequestHandler MapRequestHandler MapRequestHandler

Se produce cuando se selecciona el controlador para responder a la solicitud.Occurs when the handler is selected to respond to the request.

PostAcquireRequestState PostAcquireRequestState PostAcquireRequestState PostAcquireRequestState

Se produce cuando se ha obtenido el estado de solicitud (por ejemplo, el estado de sesión) asociado con la solicitud actual.Occurs when the request state (for example, session state) that is associated with the current request has been obtained.

PostAuthenticateRequest PostAuthenticateRequest PostAuthenticateRequest PostAuthenticateRequest

Se produce cuando un módulo de seguridad ha establecido la identidad del usuario.Occurs when a security module has established the identity of the user.

PostAuthorizeRequest PostAuthorizeRequest PostAuthorizeRequest PostAuthorizeRequest

Se produce cuando se ha autorizado al usuario de la solicitud actual.Occurs when the user for the current request has been authorized.

PostLogRequest PostLogRequest PostLogRequest PostLogRequest

Se produce cuando ASP.NET ha completado el procesamiento de todos los controladores de eventos para el evento LogRequest.Occurs when ASP.NET has completed processing all the event handlers for the LogRequest event.

PostMapRequestHandler PostMapRequestHandler PostMapRequestHandler PostMapRequestHandler

Se produce cuando ASP.NET ha asignado la solicitud actual al controlador de eventos adecuado.Occurs when ASP.NET has mapped the current request to the appropriate event handler.

PostReleaseRequestState PostReleaseRequestState PostReleaseRequestState PostReleaseRequestState

Se produce cuando ASP.NET ha finalizado de ejecutar todos los controladores de eventos de la solicitud y se han almacenado los datos de estado de la solicitud.Occurs when ASP.NET has completed executing all request event handlers and the request state data has been stored.

PostRequestHandlerExecute PostRequestHandlerExecute PostRequestHandlerExecute PostRequestHandlerExecute

Se produce cuando el controlador de eventos ASP.NET (por ejemplo, una página o un servicio Web XML) finaliza su ejecución.Occurs when the ASP.NET event handler (for example, a page or an XML Web service) finishes execution.

PostResolveRequestCache PostResolveRequestCache PostResolveRequestCache PostResolveRequestCache

Se produce cuando ASP.NET omite la ejecución del controlador de eventos actual y permite que un módulo de almacenamiento en caché atienda una solicitud desde la caché.Occurs when ASP.NET bypasses execution of the current event handler and allows a caching module to serve a request from the cache.

PostUpdateRequestCache PostUpdateRequestCache PostUpdateRequestCache PostUpdateRequestCache

Se produce cuando ASP.NET completa la actualización de los módulos de almacenamiento en caché que almacenan las respuestas que se usan para atender las posteriores solicitudes de la caché.Occurs when ASP.NET finishes updating caching modules and storing responses that are used to serve subsequent requests from the cache.

PreRequestHandlerExecute PreRequestHandlerExecute PreRequestHandlerExecute PreRequestHandlerExecute

Se produce justo antes de que ASP.NET comience a ejecutar un controlador de eventos (por ejemplo, una página o un servicio Web XML).Occurs just before ASP.NET starts executing an event handler (for example, a page or an XML Web service).

PreSendRequestContent PreSendRequestContent PreSendRequestContent PreSendRequestContent

Se produce inmediatamente antes de que ASP.NET envíe el contenido al cliente.Occurs just before ASP.NET sends content to the client.

PreSendRequestHeaders PreSendRequestHeaders PreSendRequestHeaders PreSendRequestHeaders

Se produce inmediatamente antes de que ASP.NET envíe los encabezados HTTP al cliente.Occurs just before ASP.NET sends HTTP headers to the client.

ReleaseRequestState ReleaseRequestState ReleaseRequestState ReleaseRequestState

Se produce después de que ASP.NET termine de ejecutar todos los controladores de eventos de la solicitud.Occurs after ASP.NET finishes executing all request event handlers. Este evento permite que los módulos de estado guarden los datos de estado actuales.This event causes state modules to save the current state data.

RequestCompleted RequestCompleted RequestCompleted RequestCompleted

Se produce al liberarse los objetos administrados asociados a la solicitud.Occurs when the managed objects that are associated with the request have been released.

ResolveRequestCache ResolveRequestCache ResolveRequestCache ResolveRequestCache

Se produce cuando ASP.NET finaliza un evento de autorización para permitir que los módulos de almacenamiento en caché atiendan las solicitudes de la caché, evitando la ejecución del controlador de eventos (por ejemplo, una página o servicio Web XML).Occurs when ASP.NET finishes an authorization event to let the caching modules serve requests from the cache, bypassing execution of the event handler (for example, a page or an XML Web service).

UpdateRequestCache UpdateRequestCache UpdateRequestCache UpdateRequestCache

Se produce cuando ASP.NET finaliza la ejecución de un controlador de eventos para permitir que los módulos de almacenamiento en caché almacenen las respuestas que se van a utilizar para atender las solicitudes siguientes de la caché.Occurs when ASP.NET finishes executing an event handler in order to let caching modules store responses that will be used to serve subsequent requests from the cache.

Implementaciones de interfaz explícitas

IHttpAsyncHandler.BeginProcessRequest(HttpContext, AsyncCallback, Object) IHttpAsyncHandler.BeginProcessRequest(HttpContext, AsyncCallback, Object) IHttpAsyncHandler.BeginProcessRequest(HttpContext, AsyncCallback, Object) IHttpAsyncHandler.BeginProcessRequest(HttpContext, AsyncCallback, Object)

Inicia una llamada asincrónica al controlador de eventos HTTP.Initiates an asynchronous call to the HTTP event handler.

IHttpAsyncHandler.EndProcessRequest(IAsyncResult) IHttpAsyncHandler.EndProcessRequest(IAsyncResult) IHttpAsyncHandler.EndProcessRequest(IAsyncResult) IHttpAsyncHandler.EndProcessRequest(IAsyncResult)

Proporciona un método End de proceso asincrónico cuando finaliza el proceso.Provides an asynchronous process End method when the process finishes.

IHttpHandler.IsReusable IHttpHandler.IsReusable IHttpHandler.IsReusable IHttpHandler.IsReusable

Obtiene un valor Boolean que indica si otra solicitud puede utilizar el objeto IHttpHandler.Gets a Boolean value indicating whether another request can use the IHttpHandler object.

IHttpHandler.ProcessRequest(HttpContext) IHttpHandler.ProcessRequest(HttpContext) IHttpHandler.ProcessRequest(HttpContext) IHttpHandler.ProcessRequest(HttpContext)

Permite el procesamiento de solicitudes Web HTTP mediante un controlador HTTP personalizado que implementa la interfaz IHttpHandler.Enables processing of HTTP Web requests by a custom HTTP handler that implements the IHttpHandler interface.

Se aplica a

Consulte también: