It depends on the solenoid. Some AC solenoid valves have DC-wound coils fitted with an integral bridge rectifier. These ones usually work fine on DC. Why make them that way? I think it's probably to make them less prone to burning out if the valve fails to pull in properly when energised (either because the spool is stuck, the voltage on the energising supply has drooped, or somebody has dismounted the coil from the valve as a quick diagnostic bodge).
How do you tell what sort of coil you've working with?
1. Read the bumf.
2. Connect to DC and measure MTTFPS (mean time to first puff...)
3. Try measuring coil resistance using a 1.2 V cell and an ammeter. If the cell fails to push any reasonable current through the coil, that suggests either that you've already failed test (2) above, or that the cell is facing a couple of diode forward voltage drops.
A.