Share via


What Is the Lifecycle of a Commerce Server Application?

Commerce Server Core Systems applications are built on top of ASP.NET. When a Commerce Server Core Systems ASP.NET application starts, the following actions occur:

  1. When the first request arrives, the ASP.NET runtime creates an AppDomain for the application. ASP.NET then creates the first instance of the HttpApplication class within the AppDomain. The AppDomain might create a pool of instances of the HttpApplication class. However, each request to the Web server is serviced by a single instance of the HttpApplication class.

  2. ASP.NET raises the OnStart event.

  3. The HttpApplication class creates and initializes the HTTP modules to service the application request. The modules are initialized in the order in which they appear in the Web.config file. Some of the HTTP modules that the HttpApplication class creates are Commerce Server Core Systems modules. The HttpApplication class calls the Init method for each module. Within the Init method, the module can subscribe to other request-processing events that the HttpApplication class raises.

  4. The Init method of the HttpApplication class is called. The Init method is a virtual method that can be overridden in the Global.asax file; however, unlike the Application_Start event handler, the Init method is called once per HttpApplication class instance.

  5. Before ASP.NET terminates the AppDomain, the HttpApplication class raises the OnEnd event.

See Also

Other Resources

What Is the Lifecycle of a Commerce Server Request?

Commerce Server and ASP.NET