obtain customer information through asp.net

-1

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;
}
    
asked by ElizaRmz 10.02.2018 в 19:45
source

1 answer

0

You can not get this information. Both UserName and MachineName only give you the information of the user and the machine in which the application is running.

    
answered by 12.02.2018 в 12:45