diff --git a/html/ajax.php b/html/ajax.php
index 76bb6a257..7d8f3cf21 100644
--- a/html/ajax.php
+++ b/html/ajax.php
@@ -22,7 +22,13 @@ if ( !isset ($_REQUEST['gDossier'])) exit();
require_once NOALYSS_INCLUDE.'/class/noalyss_parameter_folder.class.php';
mb_internal_encoding("UTF-8");
-
+/**
+ * if not connected, session is expired then exit with a message NOCONX
+ */
+if ( ! isset($_SESSION[SESSION_KEY."g_user"])) {
+ echo "NOCONX";
+ die();
+}
global $g_user,$cn,$g_parameter;
$cn=Dossier::connect();
$g_parameter=new Noalyss_Parameter_Folder($cn);