After performing some excavation in handling exceptions to Silverlight and reading some useful blogs like this, I apply the same idea in App.xaml To stop the .CCC error page and call the event viewer to log the error, call the other WCF service method:
Private Zero Application_Unmitted exceptions (Object Sender, ApplicationUnhandledExceptionEventArgs e) {If (! System.Diagnostics Debugger. ) {Var error page = new error (); ErrorPage.Show (); String error log = string Format ("{0} {1}", e.ExceptionObject.Message, e.ExceptionObject.StackTrace); Eventhandler & LT; WriteIntoEventLogCompletedEventArgs & gt; Callback = (S, EV) => {Bool result = ev.Result; }; (New Service Proxy & lt; ApplicationServiceClient & gt; ()) CallService & lt; WriteIntoEventLogCompletedEventArgs & gt; (Callback, errorMsg); E.Handled = True; }}
And I have this error. Xaml.cs:
Private Zero OKButton_Click (Object Sender, RoutedEventArgs e) {this.DialogResult = True; }
When the user clicks on OK, the original error page will close the page.
Everything fixes many cases. The problem occurs when one of the callbacks is due to an WCF service exception. The error page will be displayed well and when the user clicks right the error page will close, but the background is still showing a busy indicator and the original service callback is still waiting for the response. I need to finish it in any form.
If someone can help, then I will become epicite.
> Thanks, COB-
Thank you very much for your helpful reply. I used the same idea and added a code to check e in the original service callback method. It's not zero, close the window (it's a tad window) with a busy synchronizer and everything works right now. Thanks again. My value is that the original service callback may be complete, but in an error condition.
Comments
Post a Comment