使用 NavigationService 时出现参数超出范围异常
虽然并非总是如此,但我在简单的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不喜欢这个问题的答案,但它看起来像是一个 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