Windows 8 version not reading local settings xml?

Dec 6, 2012 at 8:53 AM

On both my app, and with the Win8 sample, I only have this as a probability:

<Probabilities AdType="DefaultHouseAd" />

But, the default ad never shows. It always shows either PubCenter or AdDuplex. I can even misspell the name of the settings XML file in the AdRotatorControl, and it still behaves the same way. It makes me think the control is not reading the settings file at all.

Steve 


Coordinator
Dec 6, 2012 at 10:47 AM

If you don't specify a probability then te default house ad is used when no other ad providers are available, it's the final fall back.

If you want to include th house ad in the rotation then you need to assign a probability to it like any other provider.

Hope that helps

Dec 6, 2012 at 3:28 PM

Giving it a probability doesn't seem to change it. (I had tried it with 100% too. I should have said that.) The default house ad is never shown. I'm trying this is with the example Win8 app (AdRotatorExampleWin8). Here's the defaultAdSettings.xml:
<?xml version="1.0" encoding="utf-8"?>
<AdSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <CultureDescriptors>
      <AdCultureDescriptor CultureName="default">
          <Probabilities Probability="100" AdType="DefaultHouseAd" />
      </AdCultureDescriptor>
   </CultureDescriptors>
</AdSettings>

Dec 6, 2012 at 4:05 PM
Edited Dec 6, 2012 at 4:54 PM

I debugged it with the source, and two different things were going on. In the sample, it was using the remote settings xml instead of the local one because it had network connectivity. That makes sense.

For my app, it was using the cached version of the remote settings file. I guess I didn't understand how local vs. remote settings (and how they're cached) worked. Thanks for your help.

Coordinator
Dec 7, 2012 at 12:01 PM

Yes the order of preference for the config file is as follows:

Network -> cached -> local

and it falls back accordingly depending on what it has been able to retrieve.

So are you able to display House Ads in rotation now?

Dec 7, 2012 at 4:04 PM

Yes, it works great. Thanks!

Coordinator
Dec 11, 2012 at 12:40 PM

Windows 8 NuGet package updated, check it out and let me know