Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are a couple of possibilities:</p> <ol> <li><p>Perhaps you have too much data to return. Put a breakpoint on the server-side and see how many rows you've got there.</p></li> <li><p>You actually don't have to return an ObservableCollection. WCF will return a list and it is up to your client to turn that into an ObservableCollection.</p></li> </ol> <p>You can alter the client timeout.</p> <pre><code> using System.ServiceModel.DomainServices.Client; /// &lt;summary&gt; /// Utility class for changing a domain context's WCF endpoint's /// SendTimeout. /// &lt;/summary&gt; public static class WcfTimeoutUtility { /// &lt;summary&gt; /// Changes the WCF endpoint SendTimeout for the specified domain /// context. /// &lt;/summary&gt; /// &lt;param name="context"&gt;The domain context to modify.&lt;/param&gt; /// &lt;param name="sendTimeout"&gt;The new timeout value.&lt;/param&gt; public static void ChangeWcfSendTimeout(DomainContext context, TimeSpan sendTimeout) { PropertyInfo channelFactoryProperty = context.DomainClient.GetType().GetProperty("ChannelFactory"); if (channelFactoryProperty == null) { throw new InvalidOperationException( "There is no 'ChannelFactory' property on the DomainClient."); } ChannelFactory factory = (ChannelFactory) channelFactoryProperty.GetValue(context.DomainClient, null); factory.Endpoint.Binding.SendTimeout = sendTimeout; } } </code></pre> <p>Pass the domain context for the long-running operation and the new value for the send timeout to the ChangeWcfSendTimeout method, and you are good. You cannot change the binding after the endpoint is used, so the best place to call this method is in the domain context's partial OnCreated method, like this:</p> <pre><code>namespace SampleNamespace.Web.Services { public partial class MyDomainContext { partial void OnCreated() { TimeSpan tenMinutes = new TimeSpan(0, 10, 0); WcfTimeoutUtility.ChangeWcfSendTimeout(this, tenMinutes); } } } </code></pre> <p>Source: <a href="http://blogs.msdn.com/b/kylemc/archive/2010/11/03/how-to-change-the-request-timeout-for-wcf-ria-services.aspx" rel="nofollow">Kyle McClennan [MSFT]</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload