I’m working on a Windows Phone 7 application that is using the Microsoft ad network. Microsoft simplifies the process by providing an AdControl control in the Advertising SDK.
To add the control to your XAML is easy.
<my1:AdControl Grid.Row=’0′
ApplicationId=‘ba766 etc.’
AdUnitId=’100xxxxxxx’
Width=’480′
Height=’80′
HorizontalAlignment=‘Center’
VerticalAlignment=‘Center’ />
Next, you need to configure some ad campaigns on the Microsoft ad center and add the correct ApplicationId and AdUnitId to your XAML. Now, when the AdControl is shown on the page, you should see it populated with data.
Failure
In our app everything worked correctly for a day or two. Eventually we noticed that we did not see the ad when testing on the device. After wasting hours of time investigating the problem the answer emerged.
You must not disable the ID_CAP_NETWORKING capability in the WMAppManifest.xml
<Capabilities> <Capability Name="ID_CAP_IDENTITY_DEVICE" /> <Capability Name="ID_CAP_IDENTITY_USER" /> <Capability Name="ID_CAP_NETWORKING"/>
</Capabilities>
Failing to set this capability causes the AdControl to fail when connecting to the ad network. This, in turn, causes the AdControl to collapse in the UI. So no ads.
In hindsight, this makes sense, as the control needs to contact the server. But this isn’t documented anywhere that I have found.

Hey, great tip – I ran into this same issue today. One note is that the
also appears to be required for the AdControl to function (in addition to the capabilities you list in your great blog post).
Thanks for saving me a bunch of time debugging this.
[...] Fix for AdControl failure on Windows Phone 7 (Walt Ritscher) [...]