From fb3f92eadd57ebb17729124a3ffe62685c3b615c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 19 Oct 2018 11:16:43 +0200 Subject: [PATCH] FIX lettura conf da DB / file x IO --- MP-IO/sendReboot.aspx.cs | 92 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/MP-IO/sendReboot.aspx.cs b/MP-IO/sendReboot.aspx.cs index 2abbcabb..ed9c25f0 100644 --- a/MP-IO/sendReboot.aspx.cs +++ b/MP-IO/sendReboot.aspx.cs @@ -3,54 +3,54 @@ using System; namespace MP_IO { - public partial class sendReboot : System.Web.UI.Page + public partial class sendReboot : System.Web.UI.Page + { + /// + /// caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) { - /// - /// caricamento pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) + // legge i get x registrare che una macchina è stata riavviata + string idxMacchina = ""; + string IPv4 = ""; + string agent = ""; + string macAddr = ""; + try + { + idxMacchina = Request.QueryString["idxMacchina"]; + } + catch + { } + try + { + macAddr = Request.QueryString["mac"]; // opzionale, mac address!!! + } + catch + { } + try + { + // recupero IP del client remoto + IPv4 = Request.UserHostName; + agent = Request.UserAgent; + } + catch + { } + try + { + // ora salvo che la macchina è stata (ri)avviata... + MapoDb.MapoDb.obj.registraStartup(idxMacchina, IPv4, agent, macAddr); + } + catch (Exception exc) + { + if (memLayer.ML.CRI("_logLevel") > 5) { - // legge i get x registrare che una macchina è stata riavviata - string idxMacchina = ""; - string IPv4 = ""; - string agent = ""; - string macAddr = ""; - try - { - idxMacchina = Request.QueryString["idxMacchina"]; - } - catch - { } - try - { - macAddr = Request.QueryString["mac"]; // opzionale, mac address!!! - } - catch - { } - try - { - // recupero IP del client remoto - IPv4 = Request.UserHostName; - agent = Request.UserAgent; - } - catch - { } - try - { - // ora salvo che la macchina è stata (ri)avviata... - MapoDb.MapoDb.obj.registraStartup(idxMacchina, IPv4, agent, macAddr); - } - catch (Exception exc) - { - if (memLayer.ML.confReadInt("_logLevel") > 5) - { - string errore = string.Format("Errore: {0}{1}", Environment.NewLine, exc); - logger.lg.scriviLog(errore, tipoLog.EXCEPTION); - lblOut.Text = errore; - } - } + string errore = string.Format("Errore: {0}{1}", Environment.NewLine, exc); + logger.lg.scriviLog(errore, tipoLog.EXCEPTION); + lblOut.Text = errore; } + } } + } } \ No newline at end of file