Windows Phone 7 Note: AdControl

Mostly a note to myself, but it could be helpful to other people that are working on the Windows Phone 7 platform, trying to work with AdControl, and having “unexpected” trouble…

OutOfMemory Exception at runtime? Make sure you have these two Capabilities set in your application manifest because it could save you hours of debugging:

   <Capability Name=”ID_CAP_NETWORKING”/>

   <Capability Name=”ID_CAP_NETWORKING”/>

Remember to set your ApplicationId and AdUnitId to your actual values from AdPublisher.

Remember to set the static property

   Microsoft.Advertising.Mobile.UI.AdControl.TestMode = false

before expecting this to work.

Word of advice: if you turn on your “for real ads” and it doesn’t work in the simulator, it won’t work on the device either.

Found a great check list on Jonas Stawski site which gave me more piece of mind, so I want to hold onto that link too.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.