2010-08-24 101 views
0

我一直在使用Shawn Wildermuths example,它一直工作正常,沒有任何問題。然而今天,我添加了一些我自己的模型和視圖模型,它仍然有效。當我開始將屬性[RequiresAuthentication]添加到我的DomainService中時,會出現問題。儘管代碼具有異常處理,但它更喜歡使Internet Explorer崩潰,而不是顯示作爲新Silverlight業務應用程序一部分的漂亮ErrorWindow。有沒有其他人遇到過這個?Silverlight 4應用程序崩潰而不是拋出異常

回答

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

您需要確保:如果應用程序在調試器外運行,請通過子窗口報告。 :)

相關問題