i'm trying to delete a Vapp and am getting the error "No Access to Entity" on the line that says vapp.Undeploy
what does this error mean and how can i correctly turn delete a running vapp?
public static void DeleteVapp(App app, VApp vApp)
{
try
{
VCloudAPI.Login(app);
ReferenceType vappRef = vdc.GetVappRefByName(vApp.VCloud_VappName);
Vapp vapp = Vapp.GetVappByReference(client, vappRef);
vapp.Undeploy(UndeployPowerActionType.FORCE).WaitForTask(0);
//refresh after last task
vapp = Vapp.GetVappByReference(client, vapp.Reference);
vapp.Delete().WaitForTask(0);
}
catch (Exception e)
{
Logger.Log(TraceLevel.Critical, e.Message);
}
}