Ejemplo n.º 1
0
 public ActionResult SystemInfo()
 {
     var model = new SystemInfoModel();
     model.NopVersion = NopVersion.CurrentVersion;
     try
     {
         model.OperatingSystem = Environment.OSVersion.VersionString;
     }
     catch (Exception) { }
     try
     {
         model.AspNetInfo = RuntimeEnvironment.GetSystemVersion();
     }
     catch (Exception) { }
     try
     {
         model.IsFullTrust = AppDomain.CurrentDomain.IsFullyTrusted.ToString();
     }
     catch (Exception) { }
     model.ServerTimeZone = TimeZone.CurrentTimeZone.StandardName;
     model.ServerLocalTime = DateTime.Now;
     model.UtcTime = DateTime.UtcNow;
     //Environment.GetEnvironmentVariable("USERNAME");
     return View(model);
 }
        public ActionResult SystemInfo()
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageMaintenance))
                return AccessDeniedView();

            var model = new SystemInfoModel();
            model.NopVersion = NopVersion.CurrentVersion;
            try
            {
                model.OperatingSystem = Environment.OSVersion.VersionString;
            }
            catch (Exception) { }
            try
            {
                model.AspNetInfo = RuntimeEnvironment.GetSystemVersion();
            }
            catch (Exception) { }
            try
            {
                model.IsFullTrust = AppDomain.CurrentDomain.IsFullyTrusted.ToString();
            }
            catch (Exception) { }
            model.ServerTimeZone = TimeZone.CurrentTimeZone.StandardName;
            model.ServerLocalTime = DateTime.Now;
            model.UtcTime = DateTime.UtcNow;
            model.HttpHost = _webHelper.ServerVariables("HTTP_HOST");
            //Environment.GetEnvironmentVariable("USERNAME");
            foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
            {
                model.LoadedAssemblies.Add(new SystemInfoModel.LoadedAssembly()
                {
                    FullName =  assembly.FullName,
                    //we cannot use Location property in medium trust
                    //Location = assembly.Location
                });
            }
            return View(model);
        }
Ejemplo n.º 3
0
 public ActionResult SystemInfo()
 {
     var model = new SystemInfoModel();
     model.NopVersion = NopVersion.CurrentVersion;
     try
     {
         model.OperatingSystem = Environment.OSVersion.VersionString;
     }
     catch (Exception) { }
     try
     {
         model.AspNetInfo = RuntimeEnvironment.GetSystemVersion();
     }
     catch (Exception) { }
     try
     {
         model.IsFullTrust = AppDomain.CurrentDomain.IsFullyTrusted.ToString();
     }
     catch (Exception) { }
     model.ServerTimeZone = TimeZone.CurrentTimeZone.StandardName;
     model.ServerLocalTime = DateTime.Now;
     model.UtcTime = DateTime.UtcNow;
     //Environment.GetEnvironmentVariable("USERNAME");
     foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
     {
         model.LoadedAssemblies.Add(new SystemInfoModel.LoadedAssembly()
         {
             FullName =  assembly.FullName,
             //we cannot use Location property in medium trust
             //Location = assembly.Location
         });
     }
     return View(model);
 }