static private GetMachineName ( System.Web.HttpContextBase httpContext ) : string | ||
httpContext | System.Web.HttpContextBase | |
return | string |
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;
}