That's because C# code is executed at the Server, not the Client: so when you use C# code to get a host system name, it returns the Server name, not the Client. It appears to work when you run it in development on the local host because the two computers are the same physical machine.
You can try
HttpRequest.UserHostName Property (System.Web)[
^] but there is a good chance it will just return the IP address.