ยง 506. Where special proceeding commenced. (a) Generally. Unless otherwise prescribed in subdivision (b) or in the law authorizing the proceeding, a special proceeding may be commenced in any county within the judicial district where the proceeding is triable. (b) Proceeding against body or officer. A proceeding against a body or officer shall be commenced in any county within the judicial district where the respondent made the determination complained of or refused to perform the duty specifically enjoined upon him by law, or where the proceedings were brought or taken in the course of which the matter sought to be restrained originated, or where the material events otherwise took place, or where the principal office of the respondent is located, except that 1. a proceeding against a justice of the supreme court or a judge of a county court or the court of general sessions shall be commenced in the appellate division in the judicial department where the action, in the course of which the matter sought to be enforced or restrained originated, is triable, unless a term of the appellate division in that department is not in session, in which case the proceeding may be commenced in the appellate division in an adjoining judicial department; and 2. a proceeding against the regents of the university of the state of New York, the commissioner of education, the commissioner of taxation and finance, the tax appeals tribunal except as provided in section two thousand sixteen of the tax law, the public service commission, the commissioner or the department of transportation relating to articles three, four, five, six, seven, eight, nine or ten of the transportation law or to the railroad law, the water resources board, the comptroller or the department of agriculture and markets, shall be commenced in the supreme court, Albany county. 3. notwithstanding the provisions of paragraph two of this subdivision, a proceeding against the commissioner of education pursuant to section forty-four hundred four of the education law may be commenced in the supreme court in the county of residence of the petitioner. 4. a proceeding against the New York city tax appeals tribunal established by section one hundred sixty-eight of the New York city charter shall be commenced in the appellate division of the supreme court, first department.