static AppInstance()
        {
            var config     = new AppConfig();
            var configNode = AppInstance.GetConfigNode(AppConfig.AppBaseKey);

            if (null != configNode)
            {
                config.Initialize(configNode);
                var systemWebInfo = System.Configuration.ConfigurationManager.GetSection("system.web");
                if (systemWebInfo != null)
                {
                    var systemWeb = (System.Web.Configuration.SystemWebSectionGroup)systemWebInfo;
                    config.Debug = systemWeb.Compilation.Debug;
                }
            }

            appConfig = config;
        }
 /// <summary>
 ///
 /// </summary>
 public AppInstance()
 {
     AppInstance.RegisterModules();
     AppInstance.SetDefaultConfig();
 }