System.Windows.Navigation.Journal.DoExternalNavigation中引发了未处理的异常 [英] Unhandled exception raised in System.Windows.Navigation.Journal.DoExternalNavigation

查看:109
本文介绍了System.Windows.Navigation.Journal.DoExternalNavigation中引发了未处理的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


根据我的日志,我有时会遇到未处理的异常,导致我的应用程序崩溃。


这是例外和它的堆栈跟踪:








< td style ="padding:5px 0px; font-family:monospace,'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif; width:35px">
1  在System.Uri.CreateThis(String uri,Boolean dontEscape,UriKind uriKind)















System.UriFormatException:A无法创建相对URI,因为'uriString'参数表示绝对URI。

2  在System.Uri..ctor(String uriString,UriKind uriKind)

3  在System.Windows.Navigation.Journal.DoExternalNavigation(NavigationDirection direction,Boolean isResumeActivation)

4  在System.Windows.Navigation.Journal.NavigateTo(NavigationDirection direction,Boolean isResumeActivation)

5   at Microsoft.Phone.TaskModel.Interop.Task.FireOnNavigateTo(Int32 direction,Boolean isResumeActivation)


好像
DoExternalNavigation
 方法尝试从导致此异常的绝对值创建relativeUri。


我不确定是什么除了在我的UnhandledException回调中处理它之外做这个。


有什么建议吗?



最好问候,


Carl

解决方案

正如它所述,你告诉它导航到一个绝对地址,而uri是一个相对的地址。你需要通过测试uri告诉它使用亲戚,或者告诉它吸收并让它解决它

Hi,

According to my logs I sometimes have an unhandled exception causing my app to crash.

Here's the exception and its stack trace:

System.UriFormatException: A relative URI cannot be created because the 'uriString' parameter represents an absolute URI.
1 at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
2 at System.Uri..ctor(String uriString, UriKind uriKind)
3 at System.Windows.Navigation.Journal.DoExternalNavigation(NavigationDirection direction, Boolean isResumeActivation)
4 at System.Windows.Navigation.Journal.NavigateTo(NavigationDirection direction, Boolean isResumeActivation)
5 at Microsoft.Phone.TaskModel.Interop.Task.FireOnNavigateTo(Int32 direction, Boolean isResumeActivation)

It seems like the DoExternalNavigation method tries to create a relativeUri from an absolute one causing this exception.

I'm not sure what to do about this besides handling it in my UnhandledException callback..

Any suggestions?

Best regards,

Carl

解决方案

As it states, you are telling it to nav to an abs. address and the uri is a relative one. You need to tell it to use relative by testing the uri, or tell it absorrelative and let it work it out


这篇关于System.Windows.Navigation.Journal.DoExternalNavigation中引发了未处理的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆