It's ampere-turns that produce the magnetic field to attract the moving part of a solenoid and operating at AC means the inductance of the coil comes into play and there is a limiting impedance restricting current. At DC the solenoid dc resistance may be very low and to get it to work correctly might mean operating it at quite low dc voltages compared to the ac operating voltage.
If you try running it at 24V dc it could easily burn-out so be careful. The current at dc wants tovoltage should be round aboutchosen so that the current is approximately the same as the RMS ac current at 24V AC.