All persons who assume to act as a corporation knowing it to be without authority to do so shall be liable as general partners for all debts, liabilities and damages incurred or arising as a result thereof: Provided, however, That when any such ostensible corporation is sued on any transaction entered by it as a corporation or on any tort committed by it as such, it shall not be allowed to use its lack of corporate personality as a defense. Anyone who assumes an obligation to an ostensible corporation as such cannot resist performance thereof on the ground that there was in fact no corporation.