简体   繁体   English

我可以使用Microsoft Commerce Server,目录API以及Windows Service Application

[英]can I work with Microsoft Commerce server, catalog API , with Windows Service Application

I worked before with "Microsoft Commerce server 2007" and used it's Catalog API to get products data in my web site. 我之前使用过“ Microsoft Commerce Server 2007”,并使用它的Catalog API在我的网站上获取产品数据。 But I have a requirement to make a windows service that uses the commerce product catalog data, but I don't know how to adjust the APP.Config of this service to get data. 但是我需要制作一个使用商业产品目录数据的Windows服务,但是我不知道如何调整该服务的APP.Config以获取数据。

Every time I try commerce code it returns Null "CommerceContext.Current"== null 每当我尝试商业代码时,它都会返回Null“ CommerceContext.Current” == null

any Idea or sample config? 任何想法或示例配置?

You need to create a CatalogContext object in Local or Agent mode. 您需要在本地或代理模式下创建CatalogContext对象。 See How to Create a CatalogContext Object for details. 有关详细信息,请参见如何创建CatalogContext对象

CommerceContext.Current is only non-null when running in the context of an ASP.NET web application. 在ASP.NET Web应用程序的上下文中运行时, CommerceContext.Current仅是非null。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM