Share via


Request Lifecycle

This topic describes how the services provided by the Commerce Server .NET Application Framework are used when completing an application request.

  1. When a new request is received, the ASP.NET runtime raises the BeginRequest event. All subscribers to that event are then called in a deterministic order. Next, the CommerceApplicationModule class creates an instance of the CommerceContext class. The current CommerceContext instance can then be accessed from any object by accessing the static property CommerceContext.Current.
  2. The other Commerce Modules that subscribe to the BeginRequest event are called. Each module has the option of setting some state in the current CommerceContext instance. For example, the CommerceCatalogModule class, if configured in the web.config file, copies a reference from its instance of the CatalogContext class into the current instance of the CommerceContext class.
  3. The Web form is run.
  4. The EndRequest event is raised and its subscribers are called. The CommerceApplicationModule class disposes of the CommerceContext object. When the CommerceContext object is disposed of, it also disposes of all resources that were registered with it during processing of the page.

See Also

Commerce Modules

Application Lifecycle

Run Time Services

CommerceContext Class

CommerceApplicationModule Class

CommerceCatalogModule Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.