Advertising Pipeline & AJAX UpdatePanel
We've added an ASP.NET Ajax Update Panel to the Starter Site and we are getting an error in the Advertising Pipeline
PIPELINE:++ component[0xA] about to be called ProgID: Commerce.CSFSaveHistory.1
RootObject: ReadValue _history VT_BSTR VT_EMPTY __empty__
PIPELINE:-- component [0xA] returned hr: 0x80004005, IErrorLevel=4 in 31 milliseconds
Error Description: Component Execution failed for component[0xA] hr: 0x80004005
ProgID: Commerce.CSFSaveHistory.1
Server cannot modify cookies after HTTP headers have been sent.
This makes sense to me. You can't update cookies on a UpdatePanel postback. Is there a recommended approach to using AJAX on the starter Site without running into this problem.
William,
I very much appreciate you answering my questions! I am completely new to Commerce Server, and I'm currently wrapping the product list control in an update panel. Using the starter site, I can't see where the pipeline control is getting called. The two pages involved are browse.aspx and productlist.ascx, in which code behind did you place the check, and in what event? the only event exposed currently is oninit in browse. Am I making any sense?
Robin
The advertising pipeline is called as a result of the CommerceComponent server control MarketingItem being on the StandardLayout masterpage. I put the code for the bypass in the MarketingItem.GetContent method, essentially doing nothing when the method is called as a result of an Ajax postback.. Note that this may cause problems if your marketing item is inside your UpdatePanel but it sounds like you're safe on that count.
You have the source for the CommerceComponents in a zip file in your StarterSite installation directory.