That, it turns out that I have a problem in my production site, that when I publish my code, I get the following error:
System.Net.Sockets.SocketException: Unknown host
The reason is because I am trying to get the name of the PC on a client computer. When I try with the following codes, the problem is the same:
String Hostname = System.Environment.MachineName;
String nombrePC = Hostname;
or with
String nombrePC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName
On my localhost development team, I have no problem, but when I navigate to the production site, that's what happens.
If anyone has any ideas, I would really appreciate it. I do not know what would be better, configure the server, or change the line of code to get the name of the computer. I preferred to make the correction from the code