Esempio n. 1
0
        private static void RestoreDriverAccount()
        {
            string oldDriver = (string)StationRegistry.GetValue("olddriver", null);

            if (oldDriver != null)
            {
                StationRegistry.SetValue("driver", oldDriver);
            }
            StationRegistry.DeleteValue("olddriver");
        }
Esempio n. 2
0
        private static void RestoreStationId()
        {
            string oldStationId = (string)StationRegistry.GetValue("oldStationId", null);

            if (oldStationId != null)
            {
                StationRegistry.SetValue("stationId", oldStationId);
            }
            StationRegistry.DeleteValue("oldStationId");
        }
Esempio n. 3
0
        protected override void HandleRequest()
        {
            string path = Parameters["path"];

            if (path == null || !Path.IsPathRooted(path))
            {
                throw new FormatException("path is null or not a full path");
            }

            StationRegistry.SetValue("resourceBasePath", path);

            RespondSuccess();
        }
Esempio n. 4
0
        public static ActionResult SetRegistry(Session session)
        {
            try
            {
                string        myPath = Assembly.GetExecutingAssembly().Location;
                Configuration config = ConfigurationManager.OpenExeConfiguration(myPath);

                StationRegistry.SetValue("cloudBaseURL", config.AppSettings.Settings["cloudBaseURL"].Value);
            }
            catch (Exception e)
            {
                Logger.Warn("Unable to set cloudBaseURL to registry", e);
            }

            return(ActionResult.Success);
        }