Print Page | Close Window

Not able to return +2500 altered entities to the server

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1433
Printed Date: 27-Apr-2025 at 7:34am


Topic: Not able to return +2500 altered entities to the server
Posted By: rasmus
Subject: Not able to return +2500 altered entities to the server
Date Posted: 19-Aug-2009 at 4:42pm
Hi
 
I have an app. returning approx 8000 entities to the client through a query. If I alter fx 1000 entities on the client and submit them using Manager.SaveChangesAsync everything is fine, but if I change more than 2500 entities and submit them, i get an:
 
 " args.Error {IdeaBlade.EntityModel.EntityManagerSaveException: The remote server returned an error: NotFound. ---> System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound..."

My web.config looks like this:

<binding name="customBinaryBinding">

<binaryMessageEncoding>

<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" />

</binaryMessageEncoding>

<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />

</binding>

I have tried creating a ServiceReferences.ClientConfig for my silverlight project using these values for binding:

<customBinding>

<!-- Custom binding using http, binary encoding, no security -->

<binding name="customBinaryBinding">

<binaryMessageEncoding />

<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />

</binding>

</customBinding>

 
But with no luck.
 
I suspect some setting is not correct, hope you can help me identify which
 



Replies:
Posted By: kimj
Date Posted: 21-Aug-2009 at 10:35am
Also try adding an httpRuntime section to the web.config to override the MaxRequestLength, which defaults to a maximum upload size of 4 meg.  Here it's set to 100 meg:
 
  <system.web>
    <httpRuntime maxRequestLength="102400"/>
  </system.web>
 
It's possible that the problem could be a timeout, although I'd expect a TimeoutException to be received rather than the vanilla CommunicationException.  You can modify the send and receive timeout defaults (which are 1 minute for a send and 10 minutes for a receive) using the <binding> element:
 
        <binding name="customBinaryBinding"
                 receiveTimeout="00:10:00"
                 sendTimeout="00:01:00">



Posted By: rasmus
Date Posted: 21-Aug-2009 at 2:20pm
The <httpRuntime maxRequestLength="102400"/> did the trick. Thanks a lot :-)



Print Page | Close Window