Any person claiming adversely to the state, or its successor in interest, any right, title, or interest in or lien upon any land claimed to have been forfeited to the state for taxes may maintain an action against the state, or its successor in interest, for the purpose of determining the title to such land and the adverse claims and the rights of the parties, respectively, therein. Such action shall be brought in the district court of the county in which the land lies. The complaint shall be filed in the office of the court administrator before the commencement of the action. A notice of the pendency of the action, describing the land, shall be recorded in the office of the county recorder of the county, or, in the case of registered land, in the office of the registrar of titles, and the action shall not be deemed to be commenced unless, in addition to other requirements, such notice is so filed. In the case of such lands held by the state in trust for its taxing districts and agencies, the summons, together with a copy of the complaint, shall be served upon the county auditor, also upon the county attorney, who shall defend the action. In the case of such lands otherwise held by the state the summons, together with a copy of the complaint, shall be served upon the attorney general, who shall defend the action.