Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

LV Web Application Server Returns Status = 0

So I have a cRIO running a webservice and a webpage which makes use of that server. The webpage is using jQuery.ajax to create the requests and handle the responses. I have setup the global ajaxError handler:

 

$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError){
	if(jqXHR.status==0){
		console.log('Could not reach server.\n Please check your network connection.');
	}else if(jqXHR.status==401){
		alert('Your session has expired, please log in again.');
	}else if(jqXHR.status==403){
		alert('Your session has expired, please log in again.');
	}else if(jqXHR.status==404){
		alert('An error occured while processing your request.  Please retry or contact support for further assistance.\n  Error details: page not found (404)');
	}else if(jqXHR.status==500){
		alert('An error occured while processing your request.  Please retry or contact support for further assistance.\n  Error details: internal server error (500)');
	}else if(thrownError=='parsererror'){
		alert('An error occured while processing your request.  Please retry or contact support for further assistance.\n  Error details: parse error"');
	}else if(thrownError=='timeout'){
		alert('Error: Request timed out.');
	}else {
		alert('An error occured while processing your request.  Please retry or contact support for further assistance.\n  Error details: '+jqXHR.responseText);
	}
});

 

The jqXHR.status is set by the web application server, does anyone know why the LabVIEW Application web server would be setting this to zero? Zero, as far as my research as shown, is not s standard html code.

 

0 Kudos
Message 1 of 2
(5,614 Views)

Hello,

 

When you open MAX, are you able to see your cRIO as connected? Because based on the code that you posted, the status code 0 means that you are not able to reach the server.

 

0 Kudos
Message 2 of 2
(5,566 Views)