0 Replies Latest reply on Feb 28, 2018 3:07 AM by spauer

    HttpNfcLeaseState not changing

    spauer Novice

      I am currently working on an app for exporting VMs.

      Unfortunately, the HttpNfcLeaseState does not change from initalizing to ready.

       

      ManagedObjectReference mor1 = new ManagedObjectReference();
      foreach (VirtualMachine vm in vmlist)
      {
         if (vm.Name.Equals("Test1"))
         {
             mor1 = vm.ExportVm();                   
         }          
      }
      
      HttpNfcLease hnLease = new HttpNfcLease(Client, mor1);
                 
      HttpNfcLeaseState hls;
      for(;;)
      {
           hls = hnLease.State;
           if (hls == HttpNfcLeaseState.ready)
           {
                 break;
           }
           if (hls == HttpNfcLeaseState.error)
           {
               Client.Logout();
               return;
           }
      }