使用 NavigationService 时出现参数超出范围异常

发布于 2024-11-08 05:26:26 字数 1216 浏览 0 评论 0原文

虽然并非总是如此,但我在简单的 NavigationService 调用中收到了参数超出范围异常。

NavigationService.Navigate(New Uri("/MainPage.xaml", UriKind.Relative));

这在大多数情况下都有效,但偶尔会失败并表示参数无效。如果你注意到的话。没有任何理由会失败。我猜也许还有其他例外?不知道会是什么。我在谷歌和这里查看过,但没有看到类似的例子。任何理想都值得赞赏。

这是堆栈跟踪。

System.Windows.dll!System.Windows.Threading.DispatcherTimer.Interval.set(System.TimeSpan value) + 0x10 bytes    
    Microsoft.Advertising.Mobile.UI.dll!Microsoft.Advertising.Mobile.UI.AdControl.PauseTimer() + 0x77 bytes 
    Microsoft.Advertising.Mobile.UI.dll!Microsoft.Advertising.Mobile.UI.AdControl.DeactivateAdControl() + 0x1d bytes    
    Microsoft.Advertising.Mobile.UI.dll!Microsoft.Advertising.Mobile.UI.AdControl.OnApplicationPageDeactivated(object sender, System.Windows.Navigation.NavigatingCancelEventArgs e) + 0x39 bytes   
    Microsoft.Phone.dll!System.Windows.Navigation.NavigationService.RaiseNavigating(System.Uri uri, System.Windows.Navigation.NavigationMode mode, bool isFragmentNavigationOnly, Microsoft.Phone.Controls.PhoneApplicationPage existingContentPage) + 0x1c bytes   
    Microsoft.Phone.dll!System.Windows.Navigation.NavigationService.Navigate(System.Uri source) + 0x178 bytes   

While not all the time, I am receiving an Argument out of range exception on a simple NavigationService call.

NavigationService.Navigate(New Uri("/MainPage.xaml", UriKind.Relative));

This works most of the time, but once in a while it fails and says the arguments aren't valid. If you notice. THERE ARE NO ARGUMENTS AT ALL TO FAIL. I'm guessing there is some other exception maybe? Not sure what it would be. I've looked on Google and around here and haven't seen a similar example. Any ideals appreciated.

Here is the stack trace.

System.Windows.dll!System.Windows.Threading.DispatcherTimer.Interval.set(System.TimeSpan value) + 0x10 bytes    
    Microsoft.Advertising.Mobile.UI.dll!Microsoft.Advertising.Mobile.UI.AdControl.PauseTimer() + 0x77 bytes 
    Microsoft.Advertising.Mobile.UI.dll!Microsoft.Advertising.Mobile.UI.AdControl.DeactivateAdControl() + 0x1d bytes    
    Microsoft.Advertising.Mobile.UI.dll!Microsoft.Advertising.Mobile.UI.AdControl.OnApplicationPageDeactivated(object sender, System.Windows.Navigation.NavigatingCancelEventArgs e) + 0x39 bytes   
    Microsoft.Phone.dll!System.Windows.Navigation.NavigationService.RaiseNavigating(System.Uri uri, System.Windows.Navigation.NavigationMode mode, bool isFragmentNavigationOnly, Microsoft.Phone.Controls.PhoneApplicationPage existingContentPage) + 0x1c bytes   
    Microsoft.Phone.dll!System.Windows.Navigation.NavigationService.Navigate(System.Uri source) + 0x178 bytes   

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一瞬间的火花 2024-11-15 05:26:26

我不喜欢这个问题的答案,但它看起来像是一个 AdControl 缺陷。下面有提到这一点。

http://forums.create.msdn.com/forums/p/66644 /473406.aspx
http://community.microsoftadvertising.com/forums/p/68721/98240.aspx

I don't like the answer to this, but it looks like an AdControl defect. Below are mentions of this.

http://forums.create.msdn.com/forums/p/66644/473406.aspx
http://community.microsoftadvertising.com/forums/p/68721/98240.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文