public string GetOnlineModules()
    {


        string SageVersion = string.Empty;
        SageFrame.Version.SageFrameVersion app = new SageFrame.Version.SageFrameVersion();
        SageVersion = string.Format("{0}", app.FormatShortVersion(app.Version, true));
        string ModuleList = string.Empty;
        string[] args = new string[1];
        args[0] = SageVersion;
        string service = "WebService";
        string method = "GetModuleList";
        string url = ModuleURl;
        try
        {
            WebServiceInvoker invoker =
          new WebServiceInvoker(
              new Uri(url));
            return ModuleList = invoker.InvokeMethod<string>(service, method, args);
        }
        catch (Exception)
        {
            return ModuleList = string.Empty;

        }

    }
Esempio n. 2
0
    //Search online modules.
    public string GetSearchModules(string searchKey)
    {
        string           SageVersion = string.Empty;
        SageFrameVersion app         = new SageFrameVersion();

        SageVersion = string.Format("{0}", app.FormatShortVersion(app.Version, true));
        string ModuleList = string.Empty;

        string[] args = new string[2];
        args[0] = searchKey;
        args[1] = SageVersion;

        string service = "WebService";
        string method  = "GetSearchResult";

        string url = ModuleURl;

        try
        {
            WebServiceInvoker invoker =
                new WebServiceInvoker(
                    new Uri(url));
            return(ModuleList = invoker.InvokeMethod <string>(service, method, args));
        }
        catch (Exception)
        {
            return(ModuleList = string.Empty);
        }
    }
    public string GetThemeList(string TemplateType, string TemplateCategory, string productType, string themeName)
    {
        SageFrameConfig sfConf       = new SageFrameConfig();
        string          categoryName = sfConf.GetSettingValueByIndividualKey(SageFrameSettingKeys.CategoryName);
        string          TemplateList = string.Empty;

        string[] args = new string[1];
        args[0] = categoryName;
        //args[1] = TemplateCategory;
        //args[2] = productType;
        //args[3] = themeName;
        string service = "OnlineStore";
        string method  = "GetThemeListByProduct";
        string url     = TemplateUrl;

        try
        {
            WebServiceInvoker invoker = new WebServiceInvoker(new Uri(url));
            return(TemplateList = invoker.InvokeMethod <string>(service, method, args));
        }
        catch (Exception)
        {
            return(TemplateList = string.Empty);
        }
    }
Esempio n. 4
0
 private static void a()
 {
     string domainName = HttpContext.Current.Request.Url.Authority;
     if (!domainName.Contains("localhost"))
     {
         if (HttpRuntime.Cache[CacheKeys.SetLayout] == null || HttpRuntime.Cache[CacheKeys.SetLayout].ToString() == string.Empty || HttpRuntime.Cache[CacheKeys.SetLayout].ToString() == "False")
         {
             string macaddress = String.Empty;
             string ipAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] != string.Empty ? HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] : HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
             string licenseKey = Readkey();
             string[] args = new string[4];
             args[0] = licenseKey;
             args[1] = domainName;
             args[2] = macaddress;
             args[3] = ipAddress;
             string service = string.Format("{0}{1}{2}", "Oau", "th", "sageframe");
             string method = string.Format("{0}{1}{2}{3}", "Val", "id", "Lic", "ense");
             string url = "http://lic" + "ense." + "sageframe." + "com/" + "Man" + "age/Oauth" + "sageframe" + ".asmx";
             WebServiceInvoker invoker =
                 new WebServiceInvoker(
                     new Uri(url));
             string result = invoker.InvokeMethod<string>(service, method, args);
             string valid = ParseResult(result);
             HttpRuntime.Cache[CacheKeys.SetLayout] = valid;
         }
     }
     else
     {
         HttpRuntime.Cache[CacheKeys.SetLayout] = true;
     }
 }
        private void DownloadComponentSuccess()
        {
            string[] args = new string[1];
            args[0] = successComponentName;
            string service = "OnlineStore";
            string method  = "ComponentDownloadSuccess";

            try
            {
                WebServiceInvoker invoker = new WebServiceInvoker(new Uri(OnlineStoreURL));
                invoker.InvokeMethod <string>(service, method, args);
                //  string tempFolder = HostingEnvironment.ApplicationPhysicalPath + "unZipComponentInstall";
                string tempFolder = HttpContext.Current.Server.MapPath(@"~\unZipComponentInstall");
                UnZipFiles(componentDownloadPath, tempFolder);
                WebBuilderController objController = new WebBuilderController();
                objController.UpdateComponentValue(downLoadcomponent.ComponentName, downLoadcomponent.ComponentValue, downLoadcomponent.UserModuleID, downLoadcomponent.Version, downLoadcomponent.UniversalComponentID, downLoadcomponent.Type);
                if (isLoopDepemdencyCheck)
                {
                    ComponentDependencies();
                }
            }
            catch (Exception ex)
            {
                //ProcessException(ex);
            }
        }
Esempio n. 6
0
        private static void a()
        {
            string appPath    = HttpContext.Current.Request.ApplicationPath != "/" ? HttpContext.Current.Request.ApplicationPath : "";
            string domainName = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority + appPath;

            if (!domainName.Contains("localhost"))
            {
                if (HttpRuntime.Cache[CacheKeys.SetLayout] == null || HttpRuntime.Cache[CacheKeys.SetLayout].ToString() == string.Empty || HttpRuntime.Cache[CacheKeys.SetLayout].ToString() == "False")
                {
                    string   macaddress = String.Empty;
                    string   ipAddress  = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] != string.Empty ? HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] : HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
                    string   licenseKey = Readkey();
                    string[] args       = new string[4];
                    args[0] = licenseKey;
                    args[1] = macaddress;
                    args[2] = ipAddress;
                    args[3] = domainName;
                    string            service = string.Format("{0}{1}{2}", "Oau", "th", "sageframe");
                    string            method  = string.Format("{0}{1}{2}{3}", "Val", "id", "Lic", "ense");
                    string            url     = "http://lic" + "ense." + "sageframe." + "com/" + "Man" + "age/Oauth" + "sageframe" + ".asmx";
                    WebServiceInvoker invoker =
                        new WebServiceInvoker(
                            new Uri(url));
                    string result = invoker.InvokeMethod <string>(service, method, args);
                    string valid  = ParseResult(result);
                    HttpRuntime.Cache[CacheKeys.SetLayout] = valid;
                }
            }
            else
            {
                HttpRuntime.Cache[CacheKeys.SetLayout] = true;
            }
        }
Esempio n. 7
0
        public object GetOnlineHelp(int offset, int limit, string searchText)
        {
            SageFrameConfig sfConfig        = new SageFrameConfig();
            string          onlineStorePath = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.OnlineStore);

            string[] args = new string[3];
            args[0] = offset.ToString();
            args[1] = limit.ToString();
            args[2] = searchText;
            string service = "OnlineStore";
            string method  = "GetOnlineWebHelp";

            try
            {
                WebServiceInvoker invoker =
                    new WebServiceInvoker(
                        new Uri(onlineStorePath));
                var data = invoker.InvokeMethod <object>(service, method, args);
                return(data);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Esempio n. 8
0
        public object GetOnlineSitesByVersion(int offset, int limit, string searchText, int sectorID, int siteCategoryID, int businessTypeID)
        {
            SageFrameConfig sfConfig        = new SageFrameConfig();
            string          onlineStorePath = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.OnlineStore);
            string          version         = Config.GetSetting("SageFrameVersion");

            string[] args = new string[7];
            args[0] = offset.ToString();
            args[1] = limit.ToString();
            args[2] = searchText;
            args[3] = sectorID.ToString();
            args[4] = siteCategoryID.ToString();
            args[5] = businessTypeID.ToString();
            args[6] = version;
            string service = "OnlineStore";
            string method  = "GetOnlineSitesByVersion";

            try
            {
                WebServiceInvoker invoker =
                    new WebServiceInvoker(
                        new Uri(onlineStorePath));
                var data = invoker.InvokeMethod <object>(service, method, args);
                return(data);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
    public string GetOnlineModules(string modules)
    {
        string SageVersion = string.Empty;

        SageFrame.Version.SageFrameVersion app = new SageFrame.Version.SageFrameVersion();
        SageVersion = string.Format("{0}", app.FormatShortVersion(app.Version, true));
        string ModuleList = string.Empty;

        string[] args = new string[1];
        args[0] = modules;
        string service = "OnlineStore";
        string method  = "ThemeModules";
        string url     = ModuleURl;

        try
        {
            WebServiceInvoker invoker =
                new WebServiceInvoker(new Uri(url));
            return(ModuleList = invoker.InvokeMethod <string>(service, method, args));
        }
        catch (Exception ex)
        {
            return(ModuleList = string.Empty);
        }
    }
        private void DownloadThemeSuccess()
        {
            string[] args = new string[1];
            args[0] = successFileName;
            string service = "OnlineStore";
            string method  = "ThemeDownloadSuccess";

            try
            {
                WebServiceInvoker invoker = new WebServiceInvoker(new Uri(OnlineStoreURL));
                invoker.InvokeMethod <string>(service, method, args);
                UnzipPackage();
            }
            catch (Exception ex)
            {
                //ProcessException(ex);
            }
        }
    private string GetOnlineComponents(string componentIDs, string onlineStoreURL)
    {
        string componentList = string.Empty;

        string[] args = new string[1];
        args[0] = componentIDs;
        string service = "OnlineStore";
        string method  = "GetOnlineComponentsByIDs";

        try
        {
            WebServiceInvoker invoker = new WebServiceInvoker(new Uri(onlineStoreURL));
            return(componentList = invoker.InvokeMethod <string>(service, method, args));
        }
        catch (Exception ex)
        {
            return(componentList = string.Empty);
        }
    }
    private void NotifyServer()
    {
        string TemplateList = string.Empty;

        string[] args = new string[1];
        args[0] = themeID;
        string service = "OnlineStore";
        string method  = "UpdateDownloadCount";
        string url     = ModuleURl;

        try
        {
            WebServiceInvoker invoker = new WebServiceInvoker(new Uri(url));
            invoker.InvokeMethod <string>(service, method, args);
        }
        catch (Exception)
        {
        }
    }
Esempio n. 13
0
        public string GetKey(string activationkey, string domainName)
        {
            string macaddress = String.Empty;
            string ipAddress  = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] != string.Empty ? HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] : HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
            string licenseKey = activationkey;

            string[] args = new string[4];
            args[0] = licenseKey;
            args[1] = macaddress;
            args[2] = ipAddress;
            args[3] = domainName;
            string            service = "Oau" + "th" + "sageframe";
            string            method  = "Acti" + "vate" + "Account";
            string            url     = "http://lic" + "ense." + "sageframe." + "com/" + "Man" + "age/Oauth" + "sageframe" + ".asmx";
            WebServiceInvoker invoker =
                new WebServiceInvoker(
                    new Uri(url));
            string result = invoker.InvokeMethod <string>(service, method, args);

            return(result);
        }
Esempio n. 14
0
        public object GetComponentByIDAndVersion(long componentID, decimal version)
        {
            SageFrameConfig sfConfig        = new SageFrameConfig();
            string          onlineStorePath = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.OnlineStore);

            string[] args = new string[2];
            args[0] = componentID.ToString();
            args[1] = version.ToString();
            string service = "OnlineStore";
            string method  = "GetComponentByIDAndVersion";

            try
            {
                WebServiceInvoker invoker =
                    new WebServiceInvoker(
                        new Uri(onlineStorePath));
                var data = invoker.InvokeMethod <BuilderComponent>(service, method, args);
                return(data);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Esempio n. 15
0
        /// <summary>
        ///     Validates the Source to ensure integrity before the source is added to the dynamic service engine
        /// </summary>
        /// <returns>Boolean</returns>
        public override bool Compile()
        {
            base.Compile();

            switch (Type)
            {
                case enSourceType.SqlDatabase:
                    if (string.IsNullOrEmpty(ConnectionString))
                    {
                        WriteCompileError(Resources.CompilerError_MissingConnectionString);
                    }
                    break;

                case enSourceType.WebService:
                    if (WebServiceUri == null)
                    {
                        WriteCompileError(Resources.CompilerError_MissingUri);
                    }
                    else
                    {
                        if (!Uri.IsWellFormedUriString(WebServiceUri.ToString(), UriKind.RelativeOrAbsolute))
                        {
                            WriteCompileError(Resources.CompilerError_InvalidUri);
                        }
                        else
                        {
                            try
                            {
                                Invoker = new WebServiceInvoker(WebServiceUri);
                            }
                            catch (Exception ex)
                            {
                                string data = string.Format("<{0}>{1}\r\nDetail:\r\n{2}</{0}>", "CompilerError",
                                    "Unable to generate Web Service Proxy", ex.Message);
                                WriteCompileError(data);
                            }
                        }
                    }

                    break;

                case enSourceType.Plugin:
                    if (string.IsNullOrEmpty(AssemblyName))
                    {
                        WriteCompileError(Resources.CompilerError_MissingAssemblyName);
                    }

                    if (string.IsNullOrEmpty(AssemblyLocation))
                    {
                        WriteCompileError(Resources.CompilerError_MissingAssemblyLocation);
                    }
                    break;

                case enSourceType.Unknown:
                    WriteCompileError(Resources.CompilerError_InvalidSourceType);
                    break;
            }

            return IsCompiled;
        }