|
Home > Archive > Commerce Server General > August 2004 > How to get CommerceContext in non web environment
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to get CommerceContext in non web environment
|
|
| boveyking 2004-08-11, 1:34 pm |
| We have more than 10 separate sites in one commerce server, and we need issue config and manage operation across sites in a non-web environment. For example, we need create one user in 4 sites at the same time. My question is how to get CommerceContext object based on site name?
Because our task is independant to specific site, we can not create a commerce project Visual studio.
Is it possible to do that?
Thanks | |
| David Messner [MSFT] 2004-08-12, 8:47 pm |
| Think of CommerceContext as CommerceHttpContext (that's what we should have
called it). CommerceContext and the HTTP Modules are only available within
a Web app.
That said, most of the BCLs can be used outside of HTTPContext. Only some
parts of the order system (e.g. PipelineInfo) has some limitations that it
must be used within HTTPContext.
E.g. you can create a ProfileContext or CatalogContext and pass a
ConsoleDebugContext to the constructor. Be sure you cache the instance of
these for the lifetime of the app - they are meant to be singletons as they
are expensive to create.
-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2004 Microsoft Corporation. All rights
reserved.
--------------------
From: boveyking <boveyking.1auix7@mail.webservertalk.com>
Subject: How to get CommerceContext in non web environment
Date: Wed, 11 Aug 2004 13:34:23 -0500
Message-ID: <boveyking.1auix7@mail.webservertalk.com>
Organization: Web Servers forum
User-Agent: www.webservertalk.com news gateway
X-Newsreader: www.webservertalk.com news gateway
X-Originating-IP: 64.42.239.181
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: ev1s-66-98-192-98.ev1servers.net 66.98.192.98
Lines: 1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:14510
X-Tomcat-NG: microsoft.public.commerceserver.general
We have more than 10 separate sites in one commerce server, and we need
issue config and manage operation across sites in a non-web
environment. For example, we need create one user in 4 sites at the
same time. My question is how to get CommerceContext object based on
site name?
Because our task is independant to specific site, we can not create a
commerce project Visual studio.
Is it possible to do that?
Thanks
--
boveyking
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message346023.html
| |
| boveyking 2004-08-13, 5:42 pm |
| Thanks David. It works with ConsoleDebugContext. |
|
|
|
|