Windows Phone 8.1(XAML)最新SDK的ServerSide错误

Windows Phone 8.1(XAML)最新SDK的ServerSide错误

问题描述:

您好。

我正在尝试将广告集成到我当前的项目中,但在关注Windows Phone 8.1(XAML)入门之后,我得到了一个奇怪的例外:

I'm trying to integrate ads into my current project, but after following the get started for Windows Phone 8.1 (XAML) I get a weird exception:

Microsoft.Advertising.Mobile.Common.AdException:参数的值无效(名称:w)。

Microsoft.Advertising.Mobile.Common.AdException: Invalid value for parameter (Name: w).

与ErrorCode:ServerSideError一起。

Together with the ErrorCode: ServerSideError.

用于adcontrol的xaml是:

The xaml used for the adcontrol is this:

<ads:AdControl x:Name="msAds"
   Height="50"
   Width="320"
   VerticalAlignment="Top"
   Canvas.ZIndex="98"
   ApplicationId="test_client"
   AdUnitId="Image320_50"
   AutoRefreshIntervalInSeconds="60"
   IsAutoRefreshEnabled="True" 
   Visibility="{Binding IsTrial, Converter={StaticResource TrueToVisible}}"
   CountryOrRegion="en-US"/>

编辑:由于John Gao的回复更新了XAML

Updated the XAML due to reply from John Gao

这个代码有什么问题吗?

Is there anything wrong in this code at all?

问候

Izaac

Regards
Izaac

您应该设置Width = 320。 PubCenter会要求您选择广告尺寸。请确保您的AdControl尺寸已设置。

You should set Width=320. PubCenter will ask you to select ad size. Please make sure your AdControl size has been set.

480x80

320x50

300x50

640x100