Content Selection Framework - No "advertising" context

This is Interesting: Free IT Magazines  
Home > Archive > Content Selection Framework > April 2004 > No "advertising" context





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 No "advertising" context
Tomas Vera

2004-04-14, 3:33 pm

Hello All,
I'm starting to play with advertising but am having trouble getting things
started.

The following line throws an exception:
ContentSelector selector =
CommerceContext.Current.TargetingSystem.SelectionContexts["advertising"].GetSelector();

Stepping through the debugger, I see that
CommerceContext.Current.TargetingSystem.SelectionContexts.Count is zero.

I've modified my web.config to include this line:

<pipeline name="advertising" path="<myCSpath>\pipelines\advertising.pcf"
transacted="false" type="CSFPipeline" loggingEnabled="true"/>

But when the app runs, and gets to the line above, there is no
SelectionContext for "advertising".

Is there something else that I need to "turn on" ?


TIA,
-tomas
Zoe Hart

2004-04-14, 3:33 pm

I'm not sure, but check and see if you've got an advertising cache
configured in your web.config in addition to your advertising pipeline:

<caches>
...
<cache name="Advertising" type="Advertising" refreshInterval="900"
retryInterval="300"/>
...
</caches>

The above should all be within the <CommerceServer> section of web.config.

Zoe Hart
Commerce Server MVP
"Tomas Vera" <tavera@NOxSPAMsbcglobal.net> wrote in message
news:8vfo701ebc5es030u5g3502the90lc8brq@
4ax.com...
> Hello All,
> I'm starting to play with advertising but am having trouble getting things
> started.
>
> The following line throws an exception:
> ContentSelector selector =
>

CommerceContext.Current.TargetingSystem.SelectionContexts["advertising"].Get
Selector();
>
> Stepping through the debugger, I see that
> CommerceContext.Current.TargetingSystem.SelectionContexts.Count is zero.
>
> I've modified my web.config to include this line:
>
> <pipeline name="advertising" path="<myCSpath>\pipelines\advertising.pcf"
> transacted="false" type="CSFPipeline" loggingEnabled="true"/>
>
> But when the app runs, and gets to the line above, there is no
> SelectionContext for "advertising".
>
> Is there something else that I need to "turn on" ?
>
>
> TIA,
> -tomas



Tomas Vera

2004-04-14, 4:51 pm

Zoe,
I found the problem.

Yes, I did have the advertising cache configured. But I was missing this
section from the Web.Config file:
<contentSelection>
<add name="advertising" cacheName="advertising"
selectionPipeline="advertising" eventPipeline="recordEvent"
redirectUrl="/"/>
</contentSelection>


In addition, I did not have a reference to CacheCompLib.Dll in my project.

Once I made these two changes, everything worked. Now, on to more
challenging things like getting a specific set of ads to run in one spot on
the page, and a different set of ads to run in another place on the page.

-tomas vera



On Wed, 14 Apr 2004 12:02:28 -0400, "Zoe Hart"
<Zoe.Hart.NoSpam@Competitive.com> wrote:

>I'm not sure, but check and see if you've got an advertising cache
>configured in your web.config in addition to your advertising pipeline:
>
><caches>
> ...
> <cache name="Advertising" type="Advertising" refreshInterval="900"
>retryInterval="300"/>
> ...
></caches>
>
>The above should all be within the <CommerceServer> section of web.config.
>
>Zoe Hart
>Commerce Server MVP
>"Tomas Vera" <tavera@NOxSPAMsbcglobal.net> wrote in message
> news:8vfo701ebc5es030u5g3502the90lc8brq@
4ax.com...
>CommerceContext.Current.TargetingSystem.SelectionContexts["advertising"].Get
>Selector();
>


Andy Xu[MSFT]

2004-04-20, 6:36 pm

Tomas,

you are right. Commerce Server runtime classes read web.config and do the initialization. You are supposed to use <contentSelection> (which is the child
node of <CommerceServer> to configrure the content selection framework. Simliar to ad, you can also add a discount <contentSelection> entry to configure
discount content selection display.

You can go to Commerce Server 2002 installation, SDK\Samples\ASPNET\Ad Sitelet folder to find some sample code related to advertisement (also a
sample web.config is included).

Good luck and let us know if you have more questions.

Andy Xu [MSFT]
Commerce Server Team
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
--------------------
From: Tomas Vera <tavera@NOxSPAMsbcglobal.net>
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: Re: No "advertising" context
Message-ID: <iv6r70dk0ou88geoh4iulopqgs3ge5ebv2@4ax.com>
References: <8vfo701ebc5es030u5g3502the90lc8brq@4ax.com> <exqAknjIEHA.364@TK2MSFTNGP11.phx.gbl>
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 69
NNTP-Posting-Host: 4.21.59.2
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr25.news.prodigy.com 1081973746 ST000 4.21.59.2 (Wed, 14 Apr 2004 16:15:46 EDT)
NNTP-Posting-Date: Wed, 14 Apr 2004 16:15:46 EDT
Organization: SBC http://yahoo.sbc.com
X-UserInfo1: T[O[S^_GPRRQBFD& #91;LZKJOPHAWB\^PBQLGPQRZ\YIJYWZUYICD^RA
QBKZQTZTX\_I[^G_KGFNON[ZOE_AZNVO^
\XGGNTCIRPIJH& #91;@RQKBXLRZ@CD^HKANYVW@RLGEZEJN@\_WZJB
NZYYKVIOR]T]MNMG_Z[YVWSCH_Q[GPC_A@CARQVXDSDA^M]
@DRVUM@RBM
Date: Wed, 14 Apr 2004 20:15:46 GMT
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!news.glorb.com!
prodigy.com!newsmst01a.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr25.news.prodigy.com.POSTED!2080ae30!not-
for-mail
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.campaigns_csf:2615
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf

Zoe,
I found the problem.

Yes, I did have the advertising cache configured. But I was missing this
section from the Web.Config file:
<contentSelection>
<add name="advertising" cacheName="advertising"
selectionPipeline="advertising" eventPipeline="recordEvent"
redirectUrl="/"/>
</contentSelection>


In addition, I did not have a reference to CacheCompLib.Dll in my project.

Once I made these two changes, everything worked. Now, on to more
challenging things like getting a specific set of ads to run in one spot on
the page, and a different set of ads to run in another place on the page.

-tomas vera



On Wed, 14 Apr 2004 12:02:28 -0400, "Zoe Hart"
<Zoe.Hart.NoSpam@Competitive.com> wrote:

>I'm not sure, but check and see if you've got an advertising cache
>configured in your web.config in addition to your advertising pipeline:
>
><caches>
> ...
> <cache name="Advertising" type="Advertising" refreshInterval="900"
>retryInterval="300"/>
> ...
></caches>
>
>The above should all be within the <CommerceServer> section of web.config.
>
>Zoe Hart
>Commerce Server MVP
>"Tomas Vera" <tavera@NOxSPAMsbcglobal.net> wrote in message
> news:8vfo701ebc5es030u5g3502the90lc8brq@
4ax.com...
>CommerceContext.Current.TargetingSystem.SelectionContexts["advertising"].Get
>Selector();
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com