Current Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets a CommerceContext object containing the current request.

Namespace:  Microsoft.CommerceServer.Runtime
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

public static CommerceContext Current { get; }

Property Value

Type: Microsoft.CommerceServer.Runtime..::.CommerceContext
A CommerceContext object containing the current request.

CommerceContext objects are created by the Commerce Server .Net Application Framework as part of the processing for every ASPX page in a commerce site. The CommerceApplicationModule class must be configured in the httpModules section in the Web.config file.

When using ASP.NET Web service methods with the SoapRpcMethodAttribute or SoapDocumentMethodAttribute attribute applied to them with the OneWay property set to true, your code will not have access to the HttpContext.Current or CommerceContext.Current properties. See the .NET framework class library OneWay property documentation for more information.