November Happy Hour will be moved to Thursday December 5th.

Interface IInitializableHttpModule

Interface that you can implement to be part of the EPiServer Framework initialization chain with support for HTTP events.

Namespace: EPiServer.Framework
Assembly: EPiServer.Framework.dll
Version: 9.12.2
Syntax
public interface IInitializableHttpModule : IInitializableModule
Remarks

You should set the attribute [InitializableModule] on the class implementing this interface, or if you want to control dependencies (making sure that other modules are initialized before your module gets called) use the attribute [ModuleDependency(typeof(ClassThatIDependOn), ...)].

Methods

InitializeHttpEvents(HttpApplication)

Initialize any events on instances created by ASP.NET

Declaration
void InitializeHttpEvents(HttpApplication application)
Parameters
Type Name Description
System.Web.HttpApplication application

The instance to initialize

Remarks

This method may be called either after or before the Initialize-method so make sure you do not have any dependencies between these methods. The beaviour that is guaranteed is that your event handlers will not be called before the Initialize-method. If EPiServer is being initialized outside ASP.NET this method will never get called.

When the ASP.NET runtime initializes it will create many instances of the class so make sure you only add logic to initialize events in this method, and not any one-time configuration which should be placed in the Initialize-method.

Since a can be disposed at any time make sure you never store references to this class since that could create a memory leak.

Extension Methods