Accessing Token object outside of Web page

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
accust01
Ensign (ENS)
Ensign (ENS)
Posts: 2
Joined: Wed Jun 11, 2008 2:01 pm

Accessing Token object outside of Web page

Post by accust01 » Sat Jun 14, 2008 1:17 am

The AbleCommerce API is great, but there does not seem to be a way to utilize it outside of the Web pages of a AbleCommerce-based site. On a site, you can easily the Token object for the current user:

int storeId = Token.Store.StoreId;

But, inside a Web or Windows service, I have not found an approach to obtaining an instance of the int CommerceBuilder.Common.Token class that allows me to interact with the site via the AbleCommerce API. With that said, the best way to work with the system is through direct access to the backend database, correct? :?:

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Accessing Token object outside of Web page

Post by Logan Rhodehamel » Tue Jun 24, 2008 11:15 am

The only way to make use of the API through a web service would be to make the web service part of the AbleCommerce web application. If the web service runs under the same application context, you will be able to use all features of the API.

Outside of that, yes, you need to work with the database directly.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

Post Reply