Shocker! - Do not use Environment.MachineName

I first found this article after I got an issue: http://blogs.msdn.com/b/brada/archive/2005/08/10/449767.aspx

Let me go around to clarifying this further, and how I re-verified this issue

http://msdn.microsoft.com/en-us/library/system.environment.machinename.aspx
MSDN clarifies that this is NETBIOS name.

http://en.wikipedia.org/wiki/NetBIOS
Wikipedia clarifies that NETBIOS name has 16 characters, but Microsoft uses only 15 characters for the same.

http://msdn.microsoft.com/en-us/library/system.net.dns.gethostname.aspx
This is what should be used.

Comments

Popular posts from this blog

Enable Visual Studio to use more than 2GB of memory

Firefox and Chrome dark mode

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?