internal static string GetMachineName(HttpContextBase httpContext)
{
if (httpContext == null)
{
try
{
return System.Environment.MachineName;
}
catch (SecurityException)
{
}
return null;
}
try
{
return httpContext.Server.MachineName;
}
catch (HttpException)
{
}
catch (SecurityException)
{
}
return null;
}