locked
Exception thrown using Mobile Advertising RRS feed

  • Question

  • Using the Microsoft Mobile Advertising SDK (Released 9/16/2010), I have this XAML in a WP7 App running in the emulator:

      <Microsoft_Advertising_Mobile_UI:AdControl x:Name="AdControl" d:LayoutOverrides="Height" Grid.Row="2" VerticalAlignment="Bottom" AdUnitId="22465 " AdModel="Contextual" ApplicationId="MostPopular" AdSelectionKeywords="WINDOWS PHONE 7,MICROSOFT"/>
    Ad I get this error when the ad unit is displayed:

    Microsoft.Advertising.Mobile.UI.AdClientException occurred
      Message=An unexpected error occurred during response processing (Name: ECN).
      StackTrace:
           at Microsoft.Advertising.Mobile.Advertisement.CreateAdvertisement(String jsonResponse, AdDownloadCompleteCallback adDownloadCompleteCallback)
           at Microsoft.Advertising.Mobile.AdPlacement.WebRequestComplete(WebRequestWrapper request)
           at Microsoft.Advertising.Mobile.WebRequestWrapper.NotifyResults()
           at Microsoft.Advertising.Mobile.WebRequestWrapper.ProcessCurrentRequestComplete()
           at Microsoft.Advertising.Mobile.WebRequestWrapper.ReadCallback(IAsyncResult result)
           at System.IO.Stream.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state)
           at Microsoft.Advertising.Mobile.WebRequestWrapper.ReadCallback(IAsyncResult result)
           at System.IO.Stream.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state)
           at Microsoft.Advertising.Mobile.WebRequestWrapper.WebRespCallback(IAsyncResult result)
           at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClassa.<InvokeGetResponseCallback>b__8(Object state2)
           at System.Threading.ThreadPool.WorkItem.doWork(Object o)
           at System.Threading.Timer.ring()


    Michael S. Scherotter Media Experience Evangelist Microsoft Corporation http://blogs.msdn.com/synergist http://twitter.com/synergist http://facebook.com/synergist
    Thursday, September 16, 2010 5:43 PM

All replies

  • Could be something more, but eliminate the following first.

    Right now, your application id is "MostPopular"

    Use an AplicationId that is listed at "How to Receive Test Advertisements During Development" http://msdn.microsoft.com/en-US/library/ff973768(v=MSADS.10).aspx

    Depending on the size of ad you want to test, the ApplicationId will change.

    Thursday, September 16, 2010 10:51 PM
  • Looking at the XAML for the ad control again, I see you'll need to change the AdUnitID also.

    TestMode property should be set to "true". It's set that way by default. If using the designer, don't change the property's value.

    Thursday, September 16, 2010 10:57 PM