diff --git a/IOB-WIN-NEXT/App.config b/IOB-WIN-NEXT/App.config index 81ea1d6b..d477e977 100644 --- a/IOB-WIN-NEXT/App.config +++ b/IOB-WIN-NEXT/App.config @@ -94,7 +94,7 @@ - + diff --git a/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.ini b/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.ini index 61c0bbe1..bdc16507 100644 --- a/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.ini +++ b/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.ini @@ -6,7 +6,7 @@ PING_MS_TIMEOUT=500 [MACHINE] VENDOR=TEST_FTP -MODEL=SONATEST_VEO +MODEL=TRUESCALE_FTP [CNC] IP=10.74.82.204 @@ -70,7 +70,7 @@ NAME=master ; Tags manuali [TAGS] -Customer=IMI-Remosa +Customer=SteamWare HostOS=WIN -HostName=MAPO-SRV-60 -HostAddr=192.168.0.12 +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 \ No newline at end of file diff --git a/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.json b/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.json index 23bb44ee..fbbd18bf 100644 --- a/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.json +++ b/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.json @@ -20,7 +20,6 @@ "LocalDir": "c:\\Steamware\\FTP\\SONATEST" } } - ] } ] diff --git a/IOB-WIN-NEXT/IobNet/Ftp.cs b/IOB-WIN-NEXT/IobNet/Ftp.cs index 06446fe5..c9f7f26c 100644 --- a/IOB-WIN-NEXT/IobNet/Ftp.cs +++ b/IOB-WIN-NEXT/IobNet/Ftp.cs @@ -290,7 +290,6 @@ namespace IOB_WIN_NEXT.IobNet // verifico di avere compiti da svolgere... if (currFtpTaskList != null && currFtpTaskList.ListTask != null && currFtpTaskList.ListTask.Count > 0) { - string sVal = ""; foreach (var srvFtp in currFtpTaskList.ListTask) { // verifico eventuale veto all'esecuzione... @@ -316,6 +315,7 @@ namespace IOB_WIN_NEXT.IobNet } else { + // FixMe ToDo verificare se necessario... //connectionOk = false; //tryDisconnect(); lgError($"Impossibile connettersi al server {srvFtp.ServerAddr}"); diff --git a/IOB-WIN-NEXT/MainForm.cs b/IOB-WIN-NEXT/MainForm.cs index 42b79cfb..ab6521a1 100644 --- a/IOB-WIN-NEXT/MainForm.cs +++ b/IOB-WIN-NEXT/MainForm.cs @@ -267,6 +267,8 @@ namespace IOB_WIN_NEXT #region Protected Fields + protected static string baseUrl = @"https://liman.egalware.com/MP/IO/"; + /// /// Ramo applicazione (x update) /// @@ -359,34 +361,6 @@ namespace IOB_WIN_NEXT } } - protected static string baseUrl = @"https://liman.egalware.com/MP/IO/"; - //protected static string baseUrl = @"https://seriate.steamware.net:8083/MP/IO/"; - - /// - /// URL per recuperare i file dell'IOB su CLOUD (SENZA IOB) - /// - protected static string urlDownloadFileCloud - { - get - { - return $"{baseUrl}IOB/getFiles/"; - //return @"http://seriate.steamware.net:8083/MP/IO/IOB/getFiles/"; - } - } - - /// - /// URL per salvare i file dell'IOB su CLOUD (SENZA IOB) - /// - protected static string urlUploadFileCloud - { - get - { - return $"{baseUrl}IOB/uploadFile/"; - //return @"http://seriate.steamware.net:8083/MP/IO/IOB/uploadFile/"; - - } - } - protected bool pingDisabled { get @@ -410,17 +384,18 @@ namespace IOB_WIN_NEXT /// URL per recuperare i file dell'IOB (SENZA IOB) /// protected string urlDownloadFile + { + get => $"http://{MPIP}{MPURL}/IOB/getFiles/"; + } + + /// + /// URL per recuperare i file dell'IOB su CLOUD (SENZA IOB) + /// + protected string urlDownloadFileCloud { get { - string answ = ""; - try - { - answ = string.Format(@"http://{0}{1}/IOB/getFiles/", MPIP, MPURL); - } - catch - { } - return answ; + return $"{baseUrl}IOB/getFiles/"; } } @@ -467,17 +442,16 @@ namespace IOB_WIN_NEXT /// protected string urlUploadFile { - get - { - string answ = ""; - try - { - answ = string.Format(@"http://{0}{1}/IOB/uploadFile/", MPIP, MPURL); - } - catch - { } - return answ; - } + get => $"http://{MPIP}{MPURL}/IOB/uploadFile/"; + } + + /// + /// URL per salvare i file dell'IOB su CLOUD (SENZA IOB) + /// + protected string urlUploadFileCloud + { + get => $"{baseUrl}IOB/uploadFile/"; + } #endregion Protected Properties @@ -1238,7 +1212,7 @@ namespace IOB_WIN_NEXT redisMan.setRSV(redKey, newMD5, ttlSec); } } - // invio solo se encessario + // invio solo se necessario if (needSend) { if (utils.CRB("ConfToCloud")) @@ -1248,8 +1222,13 @@ namespace IOB_WIN_NEXT } else { - // invio in locale! + // provo invio locale answ = utils.callUrl($"{urlUploadFile}{currIob}", rawData); + // se va male invio cloud... + if (answ.ToUpper() != "OK") + { + answ = utils.callUrl($"{urlUploadFileCloud}{currIob}", rawData); + } } } }