2

I have four service call functions for dropdown binding in a screen, am using angularjs http call for get data from WEB API service.

below are the methods

 function loadProjects() {
            $http({
                method: 'GET',
                url: rootUrl + '/api/Project/ProjectList',
                headers: {
                    'Content-Type': "application/json; charset=utf-8"
                }
            }).success(function (response) {
                response.push({ ProjectName: "Select", ProjectId: 0 });
                $scope.ProjectList = response;
                $scope.SelectedProject = response[$scope.ProjectList.length - 1];
            }).error(function (response, errorCode) {
                if (errorCode == 444) {
                    //toastr.error('Your email address is does not verrified ', 'Error');
                }
            })
        }
        function loadTasks() {
            $http({
                method: 'GET',
                url: rootUrl + '/api/Task/TaskList',
                headers: {
                    'Content-Type': "application/json; charset=utf-8"
                }
            }).success(function (response) {
                $scope.TaskList = response;
            }).error(function (response, errorCode) {
                if (errorCode == 444) {
                    //toastr.error('Your email address is does not verrified ', 'Error');
                }
            })
        }
        function loadStatus() {
            $http({
                method: 'GET',
                url: rootUrl + '/api/Status/GetAllStatus',
                headers: {
                    'Content-Type': "application/json; charset=utf-8"
                }
            }).success(function (response) {
                response.push({ StatusTypeName: "Select", StatusTypeId: 0 });
                $scope.StatusType = response;
                $scope.SelectedStatusType = response[$scope.StatusType.length - 1];
            }).error(function (response, errorCode) {
                if (errorCode == 444) {
                    //toastr.error('Your email address is does not verrified ', 'Error');
                }
            })
        }
        function loadUserList() {
            $http({
                method: 'GET',
                url: rootUrl + '/api/Account/ListOfUsers',
                headers: {
                    'Content-Type': "application/json; charset=utf-8"
                }
            }).success(function (response) {
                response.push({ FirstName: "Select", UserId: 0 });
                $scope.UserList = response;
                $scope.SelectedUser = response[$scope.UserList.length - 1];
            }).error(function (response, errorCode) {
                if (errorCode == 444) {
                    //toastr.error('Your email address is does not verrified ', 'Error');
                }
            })
        }

I have call the above functions in one by one.

loadUserList();
loadProjects();
loadStatus();
loadTasks();

Html : I have binding the four dropdown by this way

<select style="width: 160px" ng-model="SelectedTask" class="form-control" name="SelectedTask"
                        ng-options="tasklist.TaskName for tasklist in  TaskList">
                    </select>

This first two functions are very slow for get some data from WEBAPI, my database have just 5 rows only. but very slow. but i am using same functions in another screen, that's working very good.

also i got this error message whenever the loadStatus(); (third function) function is calling.

The error message is : JavaScript runtime error: Not enough storage is available to complete this operation. in angularjs

And also i will show the performance details when i run some other screens vs the problem detected screen.

enter image description here

See the CPU usage. I can't find out the solution. Please help me.

I also got some answers from google, but they said it is a visual studio problem. but I don't think this is vs problem. because other screens are working well. Please help me guys ;) Thanks in advance

Ramesh Rajendran
  • 37,412
  • 45
  • 153
  • 234
  • Is your javascript error only in IE? – wholevinski Apr 24 '15 at 11:07
  • 1
    Yes, i got this error only in IE. Other browser does not show any error. But i got performance issues only. – Ramesh Rajendran Apr 24 '15 at 11:08
  • Hm, k. Have you tried inspecting what the responses are in your ajax calls? I'd just want to verify that you're not pulling in something you don't want to. For example, an ORM might unexpectedly pull in joined tables and you end up with a giant model object instead of a small row like you expect. – wholevinski Apr 24 '15 at 11:13
  • Also, have you tried making the ajax calls synchronous (not ideal, but for debugging). Put the next call in the success callback of each one and see if it's angular that's getting slammed because all of your ajax calls are returning at once. It should be able to handle this...and much more though... Just an idea. – wholevinski Apr 24 '15 at 11:14
  • Similar issues: http://stackoverflow.com/questions/27405826/internet-explorer-11-not-enough-storage-error http://stackoverflow.com/questions/5979073/not-enough-storage-is-available-to-complete-this-operation https://connect.microsoft.com/IE/Feedback/Details/1053110 – advncd Jun 27 '16 at 21:40

1 Answers1

1

I was able to solve a problem with the same error by going into IE's Internet Options > Browsing History Settings > Disk Space. Increase the disk space allowed and this may solve your problem.

It turns out IE by default only allows 250MB disk space to be used by the browser. Of course this is only an environmental change specific to one machine, but this worked in my case (as we used data > 250 MB)