title: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown in angularjs
body: <p>I have spent couple of weeks for this issue. but still I can't resolve this issue.</p>
  
  <p>i am calling a web API service by using <code>http</code> in <code>angularjs</code></p>
  
  <pre><code>           $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) {
                 }
             })
  </code></pre>
  
  <p>I have put break point in server and client side coding. </p>
  
  <p>When i call the service, the server side method hit quickly </p>
  
  <p>My server side method (<strong>am Using MVC WEB API with entity framework</strong>)</p>
  
  <pre><code>    [ActionName("ProjectList")]
      [HttpGet]   
      public IList&lt;Project&gt; ProjectList(Project projectModel)
      {
          return objIProjectService.ListOfProject();
      }
  </code></pre>
  
  <p>I checked, the service return 8 records( 8 rows from database) with a break point in <code>objIProjectService.ListOfProject();</code> this line.</p>
  
  <p>everything is going good. But my (response) <code>http.success and http.error</code>  call back functions are hitting very slow.</p>
  
  <p>Please see below image for the performance  while i calling the <code>http</code> methods</p>
  
  <p><img src="https://i.stack.imgur.com/v9bOT.png" alt="enter image description here"></p>
  
  <p>Finally the <code>http error function</code> hit after 5 or 10 mins with this below error message.</p>
  
  <p><strong><em>System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown</em></strong></p>
  
  <p>This is the problem. Please let me know how can i solve it? </p>
  
  <p>Actually am did something for this issue.</p>
  
  <ul>
  <li>I have cleared the temp folder - not working </li>
  <li>I have restart the Visual studio and clean the solution, restart my system and repairing visual studio.- not working </li>
  <li>But if I have deleted some rows in database  (am using <code>sql server 2008 r2</code> ), then it's working. </li>
  </ul>
  
  <p>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?? <strong><em>Why??</em></strong>
  re
  could you please share your solution if you stuck this issue.</p>