I have created a new SL 5 Web Site Application. I made all the contract stuff and can call the service and return to the client successfully. And I have a bunch of the config parameters set to their maxes so that I can return a large list of objects (approx. 80k of them).
The first time I run it in the debugger and call the service method, everything is good. The second time and all subsequent times until I restart VS, they fail on serialization in the service. Why can it work once and not another time?
Here is my code (in Oxygene language):
method ViewModel.GetSurveyHeaders: List<VSDS.Data.DataContracts.SurveyHeader>; begin SurveyHeaders := nil; var Proxy := ServiceProxy.NewClient; Proxy.GetSurveyHeadersCompleted += ProxyGetSurveyHeadersCompleted; Proxy.GetSurveyHeadersAsync; end; method ViewModel.ProxyGetSurveyHeadersCompleted(sender: Object; e: GetSurveyHeadersCompletedEventArgs); begin if sender <> nil then begin VSDSRestServiceClient( sender ).GetSurveyHeadersCompleted -= ProxyGetSurveyHeadersCompleted; VSDSRestServiceClient( sender ).CloseAsync; end; if e.Error <> nil then begin MessageBox.Show( 'Error: ' + e.Error.Message ); exit; end; self.SurveyHeaders := e.Result; end;
It is acting like the server is caching the original requested data and not giving up the memory when it is done serializing.
Anybody got a clue? (no, I'm not going to change the amount of data I'm returning. not an option)