<?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 Operation Timing Out</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Async Operation Timing Out</description>
  <pubDate>Tue, 28 Apr 2026 18:03:21 -700</pubDate>
  <lastBuildDate>Sun, 23 Aug 2009 19:08:59 -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=1438</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 Operation Timing Out : Setting a SendTimeout on the client-side...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1438&amp;PID=5231#5231</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> 1438<br /><strong>Posted:</strong> 23-Aug-2009 at 7:08pm<br /><br />Setting a SendTimeout on the client-side binding should fix the problem, although it looks like the ServiceReferences.ClientConfig isn't correct, so is probably being ignored.&nbsp; There's a sample ClientConfig in the Deployment\Snippets\Silverlight section of the Learning Resources, but here's one too - <DIV>&nbsp;</DIV><DIV>&lt;configuration&gt;</DIV><DIV>&nbsp; &lt;system.serviceModel&gt;</DIV><DIV>&nbsp;&nbsp;&nbsp; &lt;client&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;endpoint name="EntityService"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address="<a href="http://localhost:9009/EntityService.svc" target="_blank">http://localhost:9009/EntityService.svc</A>"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; binding="customBinding" bindingConfiguration="customBinaryBinding"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; contract="IdeaBlade.EntityModel.IEntityServiceContractAsync"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;endpoint name="EntityServer"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address="<a href="http://localhost:9009/EntityServer.svc" target="_blank">http://localhost:9009/EntityServer.svc</A>"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; binding="customBinding" bindingConfiguration="customBinaryBinding"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; contract="IdeaBlade.EntityModel.IEntityServerContractAsync"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/client&gt;</DIV><DIV>&nbsp;&nbsp;&nbsp; &lt;bindings&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;customBinding&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;binding name="customBinaryBinding" sendTimeout="00:20:00"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;binaryMessageEncoding/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/binding&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/customBinding&gt;</DIV><DIV>&nbsp;&nbsp;&nbsp; &lt;/bindings&gt;<BR>&nbsp; &lt;/system.serviceModel&gt;<BR>&lt;/configuration&gt;<BR></DIV>]]>
   </description>
   <pubDate>Sun, 23 Aug 2009 19:08:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1438&amp;PID=5231#5231</guid>
  </item> 
  <item>
   <title>Async Operation Timing Out : I have a class that implements...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1438&amp;PID=5222#5222</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=308" rel="nofollow">skingaby</a><br /><strong>Subject:</strong> 1438<br /><strong>Posted:</strong> 21-Aug-2009 at 1:40pm<br /><br />I have a class that implements an async behavior.  When it runs, it times out after 2 minutes with the following error message:<br /><em>IdeaBlade.EntityModel.EntityServerException occurred<br />  Message="The HTTP request to 'http://localhost:9009/EntityServer.svc' has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout."<br />  Cancelled=false<br />  StackTrace:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at GcsAg.ClientModel.Test.ContactTest.ContactServiceCallback(InvokeServerMethodEventArgs args)<br />  InnerException: System.TimeoutException<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Message="The HTTP request to 'http://localhost:9009/EntityServer.svc' has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout."<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StackTrace:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at IdeaBlade.EntityModel.EntityServerProxy.InvokeServerMethod(SessionBundle sessionBundle, ITypeWrapper entityManagerType, String typeName, String methodName, Object&#091;&#093; args)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at IdeaBlade.EntityModel.EntityManager.&lt;InvokeServerMethodAsyncCore&gt;b__74(InvokeServerMethodEventArgs args)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InnerException: System.Net.WebException<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Message=""<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StackTrace:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InnerException: System.Net.WebException<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Message=""<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StackTrace:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Net.Browser.BrowserHttpWebRequest.&lt;&gt;c__DisplayClass5.&lt;EndGetResponse&gt;b__4(Object sendState)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Net.Browser.AsyncHelper.&lt;&gt;c__DisplayClass2.&lt;BeginOnUI&gt;b__0(Object sendState)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InnerException: <br /></em><br /><br />Here's the class:<br /><table width="99%"><tr><td><pre class="BBcode"><br />&nbsp;&nbsp;&nbsp;&nbsp;public static class ContactAsyncBehaviors<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void GetLotusNotesContactsAsync(string user, bool useRealEmail, AsyncCompletedCallback&lt;InvokeServerMethodEventArgs&gt; callback)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var manager = LocalEntityManager.DefaultManager;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ServerMethodDelegate mydelegate = new ServerMethodDelegate(GetLotusNotesContacts);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Guid myToken = Guid.NewGuid();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;manager.InvokeServerMethodAsync(mydelegate, callback, myToken, user, useRealEmail);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#091;AllowRpc&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static string GetLotusNotesContacts(IPrincipal principal, EntityManager em, params object&#091;&#093; args)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IService service = (IService)LocalUnityContainer.MainContainer.Resolve(typeof(IService), "LoadLotusNotesContacts");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;service.Execute((string)args&#091;0&#093;, (bool)args&#091;1&#093;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return (string)service.ReturnValues&#091;0&#093;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;}</pre></td></tr></table><br /><br />The service is instantiated server-side through Unity and the service.Execute method takes a while to run. When the service.Execute is finished, the server-side GetLotusNotesContacts returns a status back to the client as a string.<br /><br />My web.config says:<br /><table width="99%"><tr><td><pre class="BBcode">&lt;customBinding &gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;binding name="customBinaryBinding"  receiveTimeout="00:20:00" sendTimeout="00:20:00" openTimeout="00:20:00" closeTimeout="00:20:00" &gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;binaryMessageEncoding &gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"  /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/binaryMessageEncoding&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"  /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/binding&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/customBinding&gt;</pre></td></tr></table><br /><br />and I added a ServiceReferences.ClientConfig that says:<br /><table width="99%"><tr><td><pre class="BBcode">&lt;system.serviceModel&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;client&gt;<br />&lt;service name="EntityService" &gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;endpoint address=""&nbsp;&nbsp;&nbsp;binding="customBinding" bindingConfiguration="customBinaryBinding" contract="IdeaBlade.EntityModel.IEntityServiceContract" /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/service&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;service name="IdeaBlade.EntityModel.Server.EntityServer"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;endpoint address="" binding="customBinding" bindingConfiguration="customBinaryBinding" contract="IdeaBlade.EntityModel.IEntityServerContract" /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/service&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/client&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;bindings&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--The default binding in the Silverlight app is http with binary encoding. <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Max values are set here for testing; you should adjust to your application's requirements.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If you modify the binding here, be sure to also create/modify the ServiceReferences.ClientConfig<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in the Silverlight application too.  Both the client and server sides must agree on<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the binding configuration in order for communications to succeed.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;customBinding &gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;binding name="customBinaryBinding"  receiveTimeout="00:20:00" sendTimeout="00:20:00" openTimeout="00:20:00" closeTimeout="00:20:00" &gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;binaryMessageEncoding &gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"  /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/binaryMessageEncoding&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"  /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/binding&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/customBinding&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/bindings&gt;<br />  &lt;/system.serviceModel&gt;</pre></td></tr></table><br /><span style="font-size:10px"><br /><br />Edited by skingaby - 21-Aug-2009 at 1:42pm</span>]]>
   </description>
   <pubDate>Fri, 21 Aug 2009 13:40:20 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1438&amp;PID=5222#5222</guid>
  </item> 
 </channel>
</rss>