Ejemplo n.º 1
0
        private void setLicenseServer()
        {
            LicenseServerSource source = new LicenseServerSource();

            source.licenseServer = cb.get_option("serverurl");
            try{
                cb.getConnection()._service.ConfigureLicenseSource(licMgr, null, source);
            }
            catch (SoapException e) {
                if (e.Detail.FirstChild.LocalName.Equals("InvalidLicenseFault"))
                {
                    Console.WriteLine("License file is not valid");
                }
                else if (e.Detail.FirstChild.LocalName.Equals("NotEnoughLicensesFault"))
                {
                    Console.WriteLine("New license source does not have " +
                                      "enough licenses.");
                }
                else if (e.Detail.FirstChild.LocalName.Equals("LicenseServerUnavailableFault"))
                {
                    Console.WriteLine("License server is unreachable.");
                }


                else
                {
                    throw e;
                }
            }
        }
Ejemplo n.º 2
0
 private void setLicenseServer()  {
    LicenseServerSource source = new LicenseServerSource();
    source.licenseServer = cb.get_option("serverurl");      
    try{
       cb.getConnection()._service.ConfigureLicenseSource(licMgr, null, source);
    }
    catch(SoapException  e) {
        
        if (e.Detail.FirstChild.LocalName.Equals("InvalidLicenseFault"))
        {
             Console.WriteLine("License file is not valid");	  
        }
       else if (e.Detail.FirstChild.LocalName.Equals("NotEnoughLicensesFault"))
        {
             Console.WriteLine("New license source does not have " +
                                   "enough licenses.");
        }
        else if (e.Detail.FirstChild.LocalName.Equals("LicenseServerUnavailableFault"))
        {
           Console.WriteLine("License server is unreachable.");
        }
          
           
       else {
          throw e;
       }
    }
 }