Cut 10 squares of foil 1 ½ times the size of the corn; place each ear of corn in the center of a piece of foil.
In a bowl, stir together the parmesan, mayonnaise, parsley, garlic, sugar, lemon juice, and cayenne until it forms a thick paste.
Rub about 2 tablespoons of the paste over each ear of corn, then seal the corn in the foil.
Preheat oven to 400°; place corn on a baking sheet; bake for 10 minutes, turn the corn over, and bake for another 10 minutes; serve hot, in the foil.
Note—after step 3, can store in zip-lock freezer bags in the refrigerator for up to 2 days or in the freezer for up to1 month; when ready to use, defrost the corn overnight in the refrigerator; then let come to room temperature for about 30 minutes, bake as directed.