Silverlight 4/ CSLA 4 - The remote server returned an error: NotFound when the object contains a lot of data

Silverlight 4/ CSLA 4 - The remote server returned an error: NotFound when the object contains a lot of data

Old forum URL: forums.lhotka.net/forums/t/10461.aspx


sweerasuriya posted on Wednesday, June 22, 2011

Hi Rocky,

I have an Report Data object which has  a collection of Report Sections & Report Summary Lines. Report Section class has a child collection of Report Lines. The object fetches all the data in a single database call (the stored procedure fetches all the data and returns 4 result sets). Using Fiddler I’ve managed to find out that the data returned over the wire is about 64KB. I’m using compression provided by CSLA in my Silverlight App. The app is basically a report data editor. All the data loads fine, but when I try to Update the data by calling BeginSave() in the View Model it errors straight away saying

“{System.Net.WebException: The remote server returned an error: NotFound.     at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)     at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)     at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)}

    System.Net.WebException: {System.Net.WebException: The remote server returned an error: NotFound.     at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)     at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)     at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)}”. 

If I load a report with less data (15KB according to fiddler) and try to save, then it works fine.

Web.Config

<system.web>

       <httpRuntime maxRequestLength="2147483647" />

</system.web>

 

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">

                     <baseAddressPrefixFilters>

                           <add prefix="http://localhost:5445/" />

                     </baseAddressPrefixFilters>

</serviceHostingEnvironment>

 

<system.webServer>

        <security>

            <requestFiltering>

                <requestLimits maxAllowedContentLength="2147483647" />

            </requestFiltering>

        </security>

    </system.webServer>

 

 

ServiceReference.ClientConfig

 

<basicHttpBinding>

        <binding name="BasicHttpBinding_IWcfPortal" maxBufferSize="2147483647"

                                                        maxReceivedMessageSize="2147483647" receiveTimeout="00:10:00" sendTimeout="00:10:00"

openTimeout="00:10:00" closeTimeout="00:10:00">

        </binding>

      </basicHttpBinding>

 

 

<endpoint address="http://localhost:5445/CompressedWcfPortal.svc"

                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWcfPortal"

                contract="WcfPortal.IWcfPortal" name="BasicHttpBinding_IWcfPortal" />

  

 

I’m not sure what else I can do to resolve the issue. If nothing else works I’ll have to split the object in to 4 objects and fetch the data separately, so that when I try to save, only a fraction of the data will be sent to the server.

sweerasuriya replied on Wednesday, June 22, 2011

Looks like it's not copied everything accross in the previous post.

 <basicHttpBinding><binding name="BasicHttpBinding_IWcfPortal" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"><readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" maxDepth="2147483647/></binding><binding name="ReportServiceBinding" maxReceivedMessageSize="2147483647" transferMode="Streamed"/></basicHttpBinding>

Copyright (c) Marimer LLC