Silverlight 4 应用程序崩溃而不是抛出异常

发布于 2024-09-15 15:21:50 字数 419 浏览 1 评论 0原文

我一直在使用 Shawn Wildermuths 示例,它运行良好,没有任何问题全部。然而今天,我添加了一些我自己的模型和视图模型,它仍然有效。当我开始将属性 [RequiresAuthentication] 添加到我的 DomainService 中时,出现问题。尽管代码具有异常处理功能,但它更愿意使 Internet Explorer 崩溃,而不是显示作为新 Silverlight 业务应用程序一部分的漂亮 ErrorWindow。还有其他人遇到过这个吗?

I have been using Shawn Wildermuths example and it has been working fine no problems at all. Today, however, I have added a few of my own Models and ViewModels and it still works. Problem appears when I start to add the attribute [RequiresAuthentication] into my DomainService. Although the code has exception handling, it prefers to crash Internet Explorer rather than display the nice ErrorWindow that is part of a new Silverlight Business Application. Has anyone else come across this?

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

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

发布评论

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

评论(1

悲欢浪云 2024-09-22 15:21:50
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            if (!System.Diagnostics.Debugger.IsAttached)
            {
                // Remove the ! from the above line
                // etc. 
            }
        }

您需要确保:如果应用程序在调试器之外运行,则通过子窗口进行报告。 :)

private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            if (!System.Diagnostics.Debugger.IsAttached)
            {
                // Remove the ! from the above line
                // etc. 
            }
        }

You need to ensure that: if the app is running outside of the debugger, report via a childwindow. :)

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