Search
More About This Website

All information is provided "AS IS" with no warranties, and confers no rights

Login
« Silverlight + CRM Book Released | Main | LinkedIn–Time to Check Your Settings »
Sunday
Aug282011

WP7 Ad Control and OutOfMemoryException

Recently we added the Windows Phone Ad Control to one of our existing applications.  It ran fine on the emulator but as soon as you put it on a real device it crashed with a System.OutOfMemoryException.  Turns out after a little investigation and locating this forum post the issue is related to capabilities specified on the application. 

More specifically you need to have ID_CAP_WEBBROWSERCOMPONENT in your WMAppManifest.xml list of capabilities.  Here’s the exact line you need to add:

<Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/>

That’s not the only capability that is needed when you add advertising, just happened that we already had the other ones on the list.  Walt Ritscher has a good blog post here that talks about how 3rd party DLLs and other references you add can expand your security foot print.

The Marketplace Test Kit or the Windows Phone Capability Detection tool can detect and auto generate these capabilities for you – details here,

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>