Beispiel #1
0
        public void VerifyLicense()
        {
            ToolsUtil.PrintLogo(OutputProvider, printLogo, TOOLNAME);
            string            ipAddress = "this machine";
            ServerLicenseInfo serverLicenseInfo;

            try
            {
                if (string.IsNullOrEmpty(Server))
                {
                    serverLicenseInfo = new ServerLicenseInfo();
                }
                else
                {
                    NCache            = new NCacheRPCService("");
                    NCache.Port       = Port;
                    NCache.ServerName = Server;
                    ipAddress         = Server;
                    ICacheServer nCacheServer = null;
                    nCacheServer = NCache.GetCacheServer(new TimeSpan(0, 0, 0, 30));
                    if (nCacheServer != null)
                    {
                        serverLicenseInfo = nCacheServer.GetServerLicenseInfo();
                    }
                    else
                    {
                        serverLicenseInfo = new ServerLicenseInfo();
                    }
                }

                OutputProvider.WriteLine("This product is registered to ");
                OutputProvider.WriteLine("User:        "******"Email:       " + serverLicenseInfo._email);
                OutputProvider.WriteLine("Company:     " + serverLicenseInfo._companyName);
                OutputProvider.WriteLine("Edition:     " + "NCache OpenSource ");

                if (LicenseManager.LicenseMode(null) == LicenseManager.LicenseType.UnRegistered)
                {
                    OutputProvider.WriteLine("\nThe machine does not have a valid registration information. Please register this machine with a FREE installation key.You can get free installation key from http://www.alachisoft.com/activate/RequestKey.php?Edition=NC-OSS-50-4x&Version=5.0&Source=Register-NCache");

                    OutputProvider.WriteLine("\nIf you are using this machine as NCache client, then you don't need to register NCache on this machine. Only cache server machines are required to be registered");
                }
                else
                {
                    OutputProvider.WriteLine("");
                    OutputProvider.WriteLine("Licensed to use FREE of cost. Use As-is without support.");
                }
            }
            catch (Exception ex)
            {
                OutputProvider.WriteLine(ex.ToString());
                return;
            }

            OutputProvider.WriteLine("\n");
        }
Beispiel #2
0
        public void VerifyLicense()
        {
            ToolsUtil.PrintLogo(OutputProvider, printLogo, TOOLNAME);
            string            ipAddress = "this machine";
            ServerLicenseInfo serverLicenseInfo;

            try
            {
                if (string.IsNullOrEmpty(Server))
                {
                    serverLicenseInfo = new ServerLicenseInfo();
                }
                else
                {
                    NCache            = new NCacheRPCService("");
                    NCache.Port       = Port;
                    NCache.ServerName = Server;
                    ipAddress         = Server;
                    ICacheServer nCacheServer = null;
                    nCacheServer = NCache.GetCacheServer(new TimeSpan(0, 0, 0, 30));
                    if (nCacheServer != null)
                    {
                        serverLicenseInfo = nCacheServer.GetServerLicenseInfo();
                    }
                    else
                    {
                        serverLicenseInfo = new ServerLicenseInfo();
                    }
                }
                OutputProvider.WriteLine("This product is registered to ");
                OutputProvider.WriteLine("User:        "******"Email:       " + serverLicenseInfo._email);
                OutputProvider.WriteLine("Company:     " + serverLicenseInfo._companyName);
                OutputProvider.WriteLine("Edition:     " + "NCache OpenSource ");

                OutputProvider.WriteLine("");
                OutputProvider.WriteLine("Licensed to use FREE of cost. Use As-is without support.");
            }
            catch (Exception ex)
            {
                OutputProvider.WriteLine(ex.ToString());
                return;
            }

            OutputProvider.WriteLine("\n");
        }