Acts of a corporation (including transfer of property) shall not be invalid by reason of the lack of capacity or power of the corporation to do such act, but such lack of capacity or power may be asserted:
- In a proceeding by a stockholder against the corporation to enjoin a corporate act. If such unauthorized acts are being performed pursuant to any contract to which the corporation is a party, the court may, if all of the parties to the contract are parties to the proceeding and if it deems the same to be equitable, set aside and enjoin the performance of such contract, and in so doing may allow to the corporation or to the other parties to the contract, as the case may be, equitable compensation for their loss from the court’s setting aside and enjoining the performance of such contract, but anticipated profits to be derived from the performance of the contract shall not be awarded by the court as a loss;
- In a proceeding by the corporation against its incumbent or former officer or director, for loss or damage due to such officer’s or director’s unauthorized act;
- In a proceeding by the Attorney General to dissolve the corporation, or to enjoin the corporation from the transaction of unauthorized business.