开发者

Silverlight 4 application crashing rather than throwing exception

开发者 https://www.devze.com 2023-01-13 11:13 出处:网络
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

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 ha开发者_StackOverflow中文版s 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?


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. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号