Windows Phone 8 AdControl AdException?

I've been testing a new Windows Phone 8 app for the last couple of weeks. I haven't published it to the Store yet, so I only tested AdControls

with test values ​​(ie "Test_client" and "Image480_80").

I noticed that the other day, as soon as I started the application, I see a second AdControl

and then it disappears. No error is thrown in the application interface, but in the Exit window I see the following exception:

An exception of type "Microsoft.Advertising.Shared.AdException" occurred in Microsoft.Advertising.Mobile.DLL and was not handled until managed / native border

Here is the stack trace:

at Microsoft.Advertising.Shared.AdvertisementFactory.CreateFromResponse (String response, AdDownloadCompleteCallback adDownloadCompleteCallback) \ r \ n
at Microsoft.Advertising.Shared.AdPlacement.CreateAdvertisement (Byte [] Bytes) at r Microsoft.Advertising.Sharedte request)

Here is my code that adds AdControl

to mine Grid

:

    AdControl adControl = new AdControl("test_client", "Image480_80", true);

    adControl.Width = 480;
    adControl.Height = 80;

    adControl.ErrorOccurred += AdUnit_ErrorOccurred;

    MyGrid.Children.Add(adControl);

    Grid.SetRow(adControl, 4);
    Grid.SetColumn(adControl, 4);

      

This one has been working until a few days ago, so I'm not sure if the code needs to be changed, but is there anything else I can check? I saw an article that said I have the required capabilities in the WMAppManifest.xml file. Here's what I currently have:

<Capabilities>
  <Capability Name="ID_CAP_NETWORKING" />
  <Capability Name="ID_CAP_MEDIALIB_AUDIO" />
  <Capability Name="ID_CAP_MEDIALIB_PLAYBACK" />
  <Capability Name="ID_CAP_SENSORS" />
  <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
  <Capability Name="ID_CAP_IDENTITY_USER" />
  <Capability Name="ID_CAP_MEDIALIB_PHOTO" />
  <Capability Name="ID_CAP_PHONEDIALER" />
</Capabilities>

      

Does anyone know anything else I can check, or know what I might be doing wrong? I'm really stumped. If there is anything else I can send from my Exception object (in addition to the stack trace above) please let me know, although I have not seen anything that hinted at a possible problem.

UPDATE:

I can also confirm that instead of my test values ​​using my actual ApplicationID and AdUnitID, the same thing happens. Is anyone else experiencing this?

UPDATE 2:

I sent emails with PubCenter support and they were apparently able to reproduce the problem because the analyst helping me (Support Analyst II) has now brought in an engineering team to investigate the problem. There is no ETA permission to resolve, but they said using my actual ApplicationID and the AdUnitID should work when tested on the device itself (although I have already confirmed it doesn't work in my emulator).

UPDATE 3:

I am still waiting to hear from PubCenter support, but now I have confirmed that DO WORK ads work successfully if I use a real ApplicationID and AdUnitID. I used to think it didn't work, but it looks like it doesn't only work when running in an emulator - on the device itself, they work fine. So only test ads don't seem to work, and since then I haven't been too worried about that.

UPDATE 4 (SOLUTION):

OK - After weeks back and forth with PubCenter support, I finally have a solution, although I'm pretty sure it's a problem at their end that has now been resolved. I created a very simple test solution that demonstrated my problem, which I sent them, and they finally concluded that this is:

AdControl adControl = new AdControl("Test_client", "Image480_80", true);

      

You need to be as follows:

AdControl adControl = new AdControl("Test_client", "Image480_80", true);

      

+3


source to share


3 answers


Apparently it is:

AdControl adControl = new AdControl("Test_client", "Image480_80", true);

      

You need to be like this (note the line "t" in test_client

):



AdControl adControl = new AdControl("Test_client", "Image480_80", true);

      

Who would have thought?

+1


source


To find out more details about the error, you can check the AdErrorEventArgs passed to the AdControl.ErrorOccurred event that you have already logged. If it's not clear from this information yet, please add the error / error code to your question.



The reason I saw this exception is because there are no ads to show (i.e. you have specified too narrow a selection of ads to display and no matching ads are available), but this should be the case in this case Be careful when viewing the error ...

+1


source


I have the same problem. The ads in my WP7.5 app work in both the emulator and phone. When I upgrade my app to WP8, the ads stop working. So I added a second ad provider control to my application and made it so that if the MS ad control gets an error, it hides and displays the second ad from another company.

0


source







All Articles