Locally it gives me the correct information, but when I publish the code I see the server information:
public string Usuario()
{
String el = Environment.UserName;
return el;
}
public string Nombre()
{
string hostname2 = Environment.MachineName;
return hostname2;
}
public string serialnumber()
{
ManagementObjectSearcher MOS = new ManagementObjectSearcher("Select * From Win32_BaseBoard");
string serial = "";
foreach (ManagementObject getserial in MOS.Get())
{
serial = getserial["SerialNumber"].ToString();
}
return serial;
}