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

Tutorial: Using Google Cloud Storage from C# and .NET

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

The ridiculous interview experience