A method for inhibiting corrosion of a metal surface in contact with an aqueous system comprising an oxidizing halogen compound, the method comprising adding to the aqueous system a compound of formula, wherein X is selected from the group consisting of - NH 2, -OH, -SH, and halogen; Y is selected from the group consisting of hydrogen, aryl, heteroaryl, C 1 -C 16 alkyl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, halosubstituted alkyl, amino, aminoalkyl, cyano, alkoxy, hydroxyl, thiol, alkylthio, carbonyl, nitro, phosphoryl, phosphonyl, and sulfonyl; R 1 is selected from the group consisting of hydrogen, deuterium, C 1 -C 16 alkyl, aryl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, heteroaryl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, hydroxyl, and carbonyl; and R 2 is selected from the group consisting of hydrogen, aryl, heteroaryl, benzyl, alkylheteroaryl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, and C 1 -C 16 alkyl; or a salt thereof; or a compound of formula, wherein X is selected from the group consisting of NH, O, and S; Y is selected from the group consisting of hydrogen, aryl, heteroaryl, C 1 -C 16 alkyl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, halosubstituted alkyl, amino, aminoalkyl, cyano, alkoxy, hydroxyl, thiol, alkylthio, carbonyl, nitro, phosphoryl, phosphonyl, and sulfonyl; R 1 is selected from the group consisting of hydrogen, aryl, heteroaryl, C 1 -C 16 alkyl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, halosubstituted alkyl, amino, aminoalkyl, cyano, alkoxy, hydroxyl, thiol, alkylthio, carbonyl, nitro, phosphoryl, phosphonyl, and sulfonyl; R 2 is selected from the group consisting of hydrogen, deuterium, C 1 -C 16 alkyl, aryl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, heteroaryl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, hydroxyl, and carbonyl; R 3 is selected from the group consisting of hydrogen, aryl, heteroaryl, benzyl, alkylheteroaryl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, and C 1 -C 16 alkyl; and m is an integer of from 0 to 9; or a salt thereof; wherein the metal surface comprises copper or a copper alloy or mild steel. Y is selected from the group consisting of hydrogen, aryl, heteroaryl, C 1 -C 16 alkyl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, halosubstituted alkyl, amino, aminoalkyl, cyano, alkoxy, hydroxyl, thiol, alkylthio, carbonyl, nitro, phosphoryl, phosphonyl, and sulfonyl; R 1 is selected from the group consisting of hydrogen, deuterium, C 1 -C 16 alkyl, aryl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, heteroaryl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, hydroxyl, and carbonyl; and R 2 is selected from the group consisting of hydrogen, aryl, heteroaryl, benzyl, alkylheteroaryl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, and C 1 -C 16 alkyl; or a salt thereof; or a compound of formula, wherein X is selected from the group consisting of NH, O, and S; Y is selected from the group consisting of hydrogen, aryl, heteroaryl, C 1 -C 16 alkyl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, halosubstituted alkyl, amino, aminoalkyl, cyano, alkoxy, hydroxyl, thiol, alkylthio, carbonyl, nitro, phosphoryl, phosphonyl, and sulfonyl; R 1 is selected from the group consisting of hydrogen, aryl, heteroaryl, C 1 -C 16 alkyl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, halosubstituted alkyl, amino, aminoalkyl, cyano, alkoxy, hydroxyl, thiol, alkylthio, carbonyl, nitro, phosphoryl, phosphonyl, and sulfonyl; R 2 is selected from the group consisting of hydrogen, deuterium, C 1 -C 16 alkyl, aryl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, heteroaryl, C 3 -C 8 cycloalkyl, benzyl, alkylheteroaryl, halogen, hydroxyl, and carbonyl; R 3 is selected from the group consisting of hydrogen, aryl, heteroaryl, benzyl, alkylheteroaryl, C 2 -C 16 alkenyl, C 2 -C 16 alkynyl, C 3 -C 8 cycloalkyl, and C 1 -C 16 alkyl; and m is an integer of from 0 to 9; or a salt thereof; wherein the metal surface comprises copper or a copper alloy or mild steel.