Hey there, I am clueless in what is causing this but I get an error when my ria service if less than 2 items are been returned, everything works ok if I have 2 or more records been returned.
My domain data source looks like this
<riaControls:DomainDataSource
AutoLoad="True"
x:Name="dsEmployee"
LoadedData="dsEmployee_LoadedData"
QueryName="GetEmployees">
<riaControls:DomainDataSource.DomainContext>
<my:TestDomainContext />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
which is been bound to a listbox like
<ListBox
x:Name="lstEmployees"
ItemsSource="{Binding ElementName=dsEmployee, Path=Data}"
However when I run the appliction I get this error
System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query 'GetEmployees'. Unexpected end of file. Following elements are not closed: IsEnabled, Employee, RootResults, GetEmployeesResult, GetEmployeesResponse. ---> System.Xml.XmlException: Unexpected end of file. Following elements are not closed: IsEnabled, Employee, RootResults, GetEmployeesResult, GetEmployeesResponse.
at System.ServiceModel.DomainServices.Client.WebDomainClient`1.EndQueryCore(IAsyncResult asyncResult)
at System.ServiceModel.DomainServices.Client.DomainClient.EndQuery(IAsyncResult asyncResult)
at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
Has anyone had the same problem? am I doing something wrong here?