|
I'm using DevForce 3.6.3 and testing this scenario in a 2-tier client-server environment. I'll try checking PersistenceServerError handler to see if anything is happening there. As a note, the ResetAsyncQuery() and GetEntitiesCompleted Handler() listed in the exception text are unchanged from the async query tutorial.
************** Exception Text ************** System.InvalidOperationException: Operation has been cancelled. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at IdeaBlade.Persistence.GetEntitiesCompletedEventArgs.get_Entities() at FrontEnd.XtraMainForm2.ResetAsyncQuery(GetEntitiesCompletedEventArgs e) at FrontEnd.XtraMainForm2.GetEntitiesCompletedHandler(Object sender, GetEntitiesCompletedEventArgs e) at IdeaBlade.Persistence.PersistenceManager.OnGetEntitiesCompleted(GetEntitiesCompletedEventArgs pArgs) at IdeaBlade.Persistence.PersistenceManager.AsyncFetchCompleted(Object pFetchState)
Stack Trace: at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks() at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at FrontEnd.Program.Main() in \\optimus\Public\Kevin\RealTimePOS\Project Files\FrontEnd\FrontEnd\Program.cs:line 23
|
|
The application I'm currently working on is using asynchronous queries to keep data up to date. I'm also working to get my application to work while disconnected from the network. The problem I am having is concerning sudden loss of network connectivity. I've set up my program to detect when connectivity is lost (loss of network in a client-server, loss of internet in an n-tier), and then cancel the asynchronous queries until connectivity is restored. Unfortunately, I'm getting an error that the 'operation has been canceled' when I cancel the async queries.
I'm canceling and restarting the async queries elsewhere without problems. It is only during this sudden loss of connectivity situation I'm testing that I have a problem. Is there a certain exception being thrown I'm not handling, or would you suggest another way to handle this situation? Or is there documentation I missed that will help?
|