(a) A foreign corporation conducting activities in this state without authority shall not maintain any action or special proceeding in this state unless and until such corporation has been authorized to conduct activities in this state and it has paid to the state all fees, penalties and franchise taxes, if any, for the years or parts thereof during which it conducted activities in this state without authority. This prohibition shall apply to any successor in interest of such foreign corporation.
(b) The failure of a foreign corporation to obtain authority to conduct activities in this state shall not impair the validity of any contract or act of the foreign corporation or the right of any other party to the contract to maintain any action or special proceeding thereon, and shall not prevent the foreign corporation from defending any action or special proceeding in this state.