FIX lettura conf da DB / file x IO
This commit is contained in:
+46
-46
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user