using solenoid magnetic field to press a button
Most commercial aerosol dispensers use a motorised cam mechanism. This gives adequate mechanical power at very low electrical power.

Figure 1. This particular mechanism runs forward to drive the segmented gear down on a custom nozzle. It must then run in reverse to go home. Note the easy mounting arrangement: pull the standard nozzle off, fit the custom nozzle and push into the bracket. Image source: EC Plaza.
These are commonly employed in air freshener dispensers and will fire a shot at pre-determined intervals.
If use of a solenoid is specified then I would be considering a pilot-operated type. This uses the fluid pressure to do most of the work and the solenoid just has to do a very small motion on a small valve.

Figure 2. A pilot-opererated solenoid valve. Image source: ATO.
The linked article has a decent explanation of the principle of operation. In your case you would need to remove the nozzle and somehow attach a tube to the canister and hold the can's internal valve open to supply constant pressure to the pilot valve.