Saturday, November 20, 2010

WP7–AdControl–Remote connection to the device has been lost

I was playing with the Windows Phone 7 AdControl and I could not get it working.

I kept getting the following error:

“The remote connection to the device has been lost.  Please verify the device connection and restart debugging.”
image

After hours of debugging I found out the reason I was getting this error was because I had customized the “WMAppManifest.xml” file and had commented out the networking and web-browser component usage capabilities for my test app, as I thought I didn’t need them. Once I uncommented those lines, voila! the adControl began working.

So if you get the above error make sure you are specifying the following capabilities for your application:

<Capability Name="ID_CAP_NETWORKING" />
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />

Another thing to take a look at are the AdUnitId and ApplicationId values that you are using while initializing the control.

1 comment:

Remember, if you want me to respond to your comment, then you need to use a Google/OpenID account to leave the comment.