I have spent couple of weeks for this issue. but still I can't resolve this issue.
i am calling a web API service by using http in angularjs
$http({
method: 'GET',
url: rootUrl + '/api/Project/ProjectList',
headers: {
'Content-Type': "application/json; charset=utf-8"
}
}).success(function (response) {
$scope.ProjectList = response;
}).error(function (response, errorCode) {
if (errorCode == 444) {
}
})
I have put break point in server and client side coding.
When i call the service, the server side method hit quickly
My server side method (am Using MVC WEB API with entity framework)
[ActionName("ProjectList")]
[HttpGet]
public IList<Project> ProjectList(Project projectModel)
{
return objIProjectService.ListOfProject();
}
I checked, the service return 8 records( 8 rows from database) with a break point in objIProjectService.ListOfProject(); this line.
everything is going good. But my (response) http.success and http.error call back functions are hitting very slow.
Please see below image for the performance while i calling the http methods

Finally the http error function hit after 5 or 10 mins with this below error message.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown
This is the problem. Please let me know how can i solve it?
Actually am did something for this issue.
- I have cleared the temp folder - not working
- I have restart the Visual studio and clean the solution, restart my system and repairing visual studio.- not working
- But if I have deleted some rows in database (am using
sql server 2008 r2), then it's working.
For example, if my database table have below than 7 rows, then it's working fast without that error. But if my table have more than 8 rows, then it's working very slowly and threw the error?? Why?? re could you please share your solution if you stuck this issue.
objIProjectService.ListOfProject();function, the structure of the database table, and sample data where it works fine and where it gives you an errorreturn context.products.ToList()