The remote server returned an error: NotFound.

Mar 23, 2010 at 6:17 PM

My project is to bind a LIST of records to a datagrid in a Silverlight project. If the size of the LIST is 7000, there is no error. But if the size of list is 9000, the I got the following error. Can somebody help me? Thanks.

When the application executes at the code "Dim _result As System.Collections.ObjectModel.ObservableCollection...." in the following subroutine in the referecnce.vb of my Silverlight project, I got the error message "The remote server returned an error: NotFound." The immediate window show the error message as "A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.dll".

Public Function EndListLicenseUsage_History(ByVal result As System.IAsyncResult) As System.Collections.ObjectModel.ObservableCollection(Of QueryArcGISLM.LUClassLicenseUsage_History) Implements QueryArcGISLM.QueryArcGISLicenseUsageService.EndListLicenseUsage_History
                Dim _args((0) - 1) As Object
                Dim _result As System.Collections.ObjectModel.ObservableCollection(Of QueryArcGISLM.LUClassLicenseUsage_History) = CType(MyBase.EndInvoke("ListLicenseUsage_History", _args, result),System.Collections.ObjectModel.ObservableCollection(Of QueryArcGISLM.LUClassLicenseUsage_History))
                Return _result
            End Function

Mar 23, 2010 at 8:10 PM

I fixed the problem by setting maxItemsInObjectGraph bigger.

 In the <serviceBehaviors><behavior>tag, add

<dataContractSerializer maxItemsInObjectGraph="200000"/>