Esempio n. 1
0
        public static bool OpenSession()
        {
            if (checkServerConnections())
                return true;
            try
            {
                Configuration rootWebConfig = null;
                try
                {
                    rootWebConfig = WebConfigurationManager.OpenWebConfiguration("/Web.config");
                }
                catch (Exception)
                {
                    rootWebConfig = WebConfigurationManager.OpenWebConfiguration("/WebDebug/Web.config");
                }

                Dictionary<string, string> dicSettings = new Dictionary<string, string>();
                foreach (KeyValueConfigurationElement prop in rootWebConfig.AppSettings.Settings)
                    dicSettings.Add(prop.Key, prop.Value);

                mg_multiplexingMgr = new IGPEMultiplexing(dicSettings);
                mg_multiplexingMgr.Initialize();
                mg_serverStatus = IGPEServerStatus.GetInstance();
                mg_serverStatus.Init();
            }
            catch (Exception exc)
            {
                if (mg_multiplexingMgr != null)
                    mg_multiplexingMgr.AppendError(exc.ToString());
            }
            return true;
        }
Esempio n. 2
0
 public static IGPEServerStatus GetInstance()
 {
     if (mg_serverStatus == null)
         mg_serverStatus = new IGPEServerStatus();
     return mg_serverStatus;
 }