Share via


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)

Syntax

'Declaration
Public Shared ReadOnly Property Current As CommerceContext
'Usage
Dim value As CommerceContext

value = CommerceContext.Current
public static CommerceContext Current { get; }
public:
static property CommerceContext^ Current {
    CommerceContext^ get ();
}
public static function get Current () : CommerceContext

Property Value

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

Remarks

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.

Permissions

See Also

Reference

CommerceContext Class

CommerceContext Members

Microsoft.CommerceServer.Runtime Namespace