System.Windows.ni.dll中出现“System.Net.WebException”类型的异常,并且在托管/本机边界之前未处理

时间:2014-07-05 12:36:29

标签: c# xaml

private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            AdView1.LoadNewAd();
            IMAdView AdView = new IMAdView
            {
                AdSize = IMAdView.INMOBI_AD_UNIT_320X50,
                AppId = "My app id", 
                Name = "AdView1"
            };
            try
            {
                IMAdRequest adRequest = new IMAdRequest();
                AdView.IMAdRequest = adRequest;
                ContentPanel.Children.Add(AdView);
            }
            catch (WebException ex)
            { }


            AdView1.RefreshInterval = 40;
            AdView1.RefreshInterval = IMAdView.REFRESH_INTERVAL_OFF;
}

在这里,我想在我的Windows Phone 8应用程序中集成Inmobi广告。但是我得到了'System.Net.WebException'。任何人都可以建议我该怎么做才能删除这种类型的错误。

0 个答案:

没有答案