private static string GetFullDomainName()
{
try
{
// Domain
string m_domainName = IPGlobalProperties.GetIPGlobalProperties().DomainName;
// Host
string m_hostName = Dns.GetHostName();
if (!m_hostName.Contains(m_domainName))
{
// add the domain name part, if the hostname does not already include the domain name
m_hostName = Convert.ToString(m_hostName + Convert.ToString(".")) + m_domainName;
}
return m_hostName;
}
catch
{
}
// Failure
return "";
}