How to resolved : Failed to load resource: net::ERR_CONNECTION_REFUSED [Resolved]

Posted by Sutotpal under Mobile Development on 2/4/2015 | Points: 10 | Views : 60774 | Status : [Member] | Replies : 3
Hi,

I m using the locally hosted WCF REST service which was working fine with VS2013 and Cordova and suddenly getting the error when running ripple .

To call the service.. i m using ANGULARJS factory design pattern .
now throwing this error ..
<big>Failed to load resource: net::ERR_CONNECTION_REFUSED</big>


and Detail is here

OPTIONS http://localhost:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rur…Serv.svc/userlogin%3FId%3D352373057521820%26UserName%3Dsrk%26Password%3Ds net::ERR_CONNECTION_REFUSEDripple.js:50 ripple.define.object.(anonymous function)angular.js:9814 (anonymous function)angular.js:9615 sendReqangular.js:9331 $get.serverRequestangular.js:13170 processQueueangular.js:13186 (anonymous function)angular.js:14383 $get.Scope.$evalangular.js:14199 $get.Scope.$digestangular.js:14488 $get.Scope.$applyangular.js:22954 (anonymous function)jquery-2.1.3.js:4430 jQuery.event.dispatchjquery-2.1.3.js:4116 jQuery.event.add.elemData.handle

And Here is mine factory code..

'use strict';
var app = angular.module('app');
app.factory('authorize', function ($http) {

return {
validateUser: function (credential) {

//return $http.get('http://localhost:1097/TestServ.svc/userlogin?Id=' + credential.id+ '&UserName=' + credential.username + '&Password=' + credential.password + '');
return $http.get('http://localhost:1097/TestServ.svc/userlogin?Id=12345&UserName=srk&Password=s');
}

};
});



AND CONTROLLER Code is here


app.controller('LoginCtrl', function ($scope, $location, $window, authorize) {

$scope.username = '';
$scope.password = '';
$scope.id = '123456';

$scope.login = function () {

var username = $scope.username;
var password = $scope.password;
var id= '123456';

var credential = {};
credential.username = username;
credential.password = password;
credential.id= id;

if (username == '' || password == '') {
alert('Enter username and password...');
}
else {

var promiseGet = authorize.validateUser(credential);
promiseGet.then(function(pl) {

var log = pl.data;

angular.forEach(log, function (value, key) {
// this.push(key + ': ' + value);
console.log('valuesGot- ' + key + ': ' + value);
});

$location.path('/dashboard');
},
function (errorPl) {
alert('failure loading Employee ..' + errorPl);
}
);
}
};
});


Best Regards,
Sutotpal



Responses

Posted by: Rajnilari2015 on: 10/15/2016 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
Press CTRL+SHIFT+DEL and delete all "Cookies and other site and plugin data" and "Cached images and files" .

--
Thanks & Regards,
RNA Team

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jolly012 on: 10/15/2016 [Member] Starter | Points: 25

Up
0
Down
Here i found the fix

http://www.deskdecode.com/err_connection_refused/

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Techinpost on: 5/9/2017 [Member] Starter | Points: 25

Up
0
Down
I found a webpage from which I get rid out of this type of error issue, now you can also check this once for

getting rid of it completely from here: http://www.techinpost.com/fix-error-err_connection_refused-code-problem

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response