<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Async Queries: handling sudden disconnect</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Async Queries: handling sudden disconnect</description>
  <pubDate>Wed, 10 Jun 2026 19:11:28 -700</pubDate>
  <lastBuildDate>Wed, 19 Nov 2008 17:37:09 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1004</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Async Queries: handling sudden disconnect : Ah, okay. The GetEntitiesCompletedHandler...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1004&amp;PID=3647#3647</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1004<br /><strong>Posted:</strong> 19-Nov-2008 at 5:37pm<br /><br />Ah, okay.&nbsp; The <FONT size=2>GetEntitiesCompletedHandler in that tutorial is not checking the GetEntitiesCompletedEventArgs to see if the operation was either cancelled or in error before trying to access the Entities property in ResetAsyncQuery().&nbsp; These args are a subclass of System.ComponentModel.AsyncCompletedEventArgs, and the event-based pattern indicates that an exception should be raised when trying to access result properties after a cancel or error.&nbsp; Here's more information: <a href="http://msdn.microsoft.com/en-us/library/system.comp&#111;nentmodel.asynccompleted&#101;ventargs.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.componentmodel.asynccompletedeventargs.aspx</A>.<DIV></DIV></FONT>]]>
   </description>
   <pubDate>Wed, 19 Nov 2008 17:37:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1004&amp;PID=3647#3647</guid>
  </item> 
  <item>
   <title>Async Queries: handling sudden disconnect : I&amp;#039;m using DevForce 3.6.3...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1004&amp;PID=3645#3645</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=401" rel="nofollow">kjohnson</a><br /><strong>Subject:</strong> 1004<br /><strong>Posted:</strong> 19-Nov-2008 at 12:39pm<br /><br />I'm using DevForce 3.6.3 and testing this scenario in a 2-tier client-server environment.&nbsp; I'll try checking PersistenceServerError handler to see if anything is happening there.&nbsp; As a note, the ResetAsyncQuery() and GetEntitiesCompleted Handler() listed in the exception text are unchanged from the async query tutorial.<br><br>************** Exception Text **************<br>System.InvalidOperationException: Operation has been cancelled.<br>&nbsp;&nbsp; at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()<br>&nbsp;&nbsp; at IdeaBlade.Persistence.GetEntitiesCompletedEventArgs.get_Entities()<br>&nbsp;&nbsp; at FrontEnd.XtraMainForm2.ResetAsyncQuery(GetEntitiesCompletedEventArgs e)<br>&nbsp;&nbsp; at FrontEnd.XtraMainForm2.GetEntitiesCompletedHandler(Object sender, GetEntitiesCompletedEventArgs e)<br>&nbsp;&nbsp; at IdeaBlade.Persistence.PersistenceManager.OnGetEntitiesCompleted(GetEntitiesCompletedEventArgs pArgs)<br>&nbsp;&nbsp; at IdeaBlade.Persistence.PersistenceManager.AsyncFetchCompleted(Object pFetchState)<br><br>Stack Trace:<br>&nbsp;&nbsp; at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object&#091;&#093; arguments, SignatureStruct&amp; sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)<br>&nbsp;&nbsp; at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object&#091;&#093; arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)<br>&nbsp;&nbsp; at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object&#091;&#093; parameters, CultureInfo culture, Boolean skipVisibilityChecks)<br>&nbsp;&nbsp; at System.Delegate.DynamicInvokeImpl(Object&#091;&#093; args)<br>&nbsp;&nbsp; at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)<br>&nbsp;&nbsp; at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)<br>&nbsp;&nbsp; at System.Threading.ExecutionContext.runTryCode(Object userData)<br>&nbsp;&nbsp; at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)<br>&nbsp;&nbsp; at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)<br>&nbsp;&nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br>&nbsp;&nbsp; at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)<br>&nbsp;&nbsp; at System.Windows.Forms.Control.InvokeMarshaledCallbacks()<br>&nbsp;&nbsp; at System.Windows.Forms.Control.WndProc(Message&amp; m)<br>&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)<br>&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)<br>&nbsp;&nbsp; at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)<br>&nbsp;&nbsp; at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)<br>&nbsp;&nbsp; at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)<br>&nbsp;&nbsp; at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)<br>&nbsp;&nbsp; at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)<br>&nbsp;&nbsp; at System.Windows.Forms.Application.Run(Form mainForm)<br>&nbsp;&nbsp; at FrontEnd.Program.Main() in \\optimus\Public\Kevin\RealTimePOS\Project Files\FrontEnd\FrontEnd\Program.cs:line 23<br>]]>
   </description>
   <pubDate>Wed, 19 Nov 2008 12:39:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1004&amp;PID=3645#3645</guid>
  </item> 
  <item>
   <title>Async Queries: handling sudden disconnect : In theory, a call to PM.CancelAsync()...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1004&amp;PID=3643#3643</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1004<br /><strong>Posted:</strong> 19-Nov-2008 at 11:11am<br /><br />In theory, a call to PM.CancelAsync() should succeed even if the operation was already cancelled -- is this where the exception is thrown?&nbsp; <DIV>&nbsp;</DIV><DIV>Depending on the timing of events, it's possible that you could see the connection failure&nbsp;in your PersistenceServerError handler.&nbsp; When the PM detects connection failures it will also enter some retry logic, so that might be confusing things.</DIV><DIV>&nbsp;</DIV><DIV>What version of DevForce are you using, and are you using WCF or remoting for communications to the BOS?&nbsp; Can you also post the full text and stack trace of the exception?</DIV>]]>
   </description>
   <pubDate>Wed, 19 Nov 2008 11:11:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1004&amp;PID=3643#3643</guid>
  </item> 
  <item>
   <title>Async Queries: handling sudden disconnect : The application I&amp;#039;m currently...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1004&amp;PID=3641#3641</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=401" rel="nofollow">kjohnson</a><br /><strong>Subject:</strong> 1004<br /><strong>Posted:</strong> 19-Nov-2008 at 8:49am<br /><br />The application I'm currently working on is using asynchronous queries to keep data up to date.&nbsp; I'm also working to get my application to work while disconnected from the network.&nbsp; The problem I am having is concerning sudden loss of network connectivity.&nbsp; 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.&nbsp; Unfortunately, I'm getting an error that the 'operation has been canceled' when I cancel the async queries.<br><br>I'm canceling and restarting the async queries elsewhere without problems.&nbsp; It is only during this sudden loss of connectivity situation I'm testing that I have a problem.&nbsp; Is there a certain exception being thrown I'm not handling, or would you suggest another way to handle this situation?&nbsp; Or is there documentation I missed that will help?<br>]]>
   </description>
   <pubDate>Wed, 19 Nov 2008 08:49:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1004&amp;PID=3641#3641</guid>
  </item> 
 </channel>
</rss>