我可以使用Windows服务应用程序与Microsoft Commerce服务器,目录API

时间:2012-09-13 17:32:32

标签: commerce microsoft-commerce-server

我之前使用过“Microsoft Commerce Server 2007”,并使用它的Catalog API在我的网站上获取产品数据。 但我要求制作一个使用商业产品目录数据的Windows服务,但我不知道如何调整此服务的APP.Config来获取数据。

每当我尝试使用商业代码时,它都会返回Null“CommerceContext.Current”== null

任何想法或示例配置?

1 个答案:

答案 0 :(得分:1)

您需要在本地或代理模式下创建CatalogContext对象。有关详细信息,请参阅How to Create a CatalogContext Object

CommerceContext.Current在ASP.NET Web应用程序的上下文中运行时仅为非null。

相关问题