Capacitor calculation for current pulse to solenoid
Short answer - yes.  The capacitor size is determined by the minimum holding current required by the solenoid, ignoring inductive effects such as dV/dt and back-EMF.  With no supply connected, here is how to calculate the capacitor size.  This example does not account for the regulator circuit headroom.

Your solenoid has a DC resistance of (48 / 0.17) = 282 ohms.  Let's assume that for the solenoid to hold in whatever force is pulling on the armature, it needs a minimum operating current of 75% of nominal, or 128 mA.  At that current the capacitor voltage is (0.128 x 282) = 36 V (duh).  So the capacitor is discharging from 48 V to 36 V in 50 ms, into a load of 282 ohms.  This is a simple R-C discharge circuit.  The exponential equation can be solved for C, the capacitor size in farads.

A quick approximation that you can do in your head is to assume a constant-current discharge rather than exponential.  In this case,

EC=IT

The change in capacitor voltage (in volts) times the capacitance value (in farads) = the constant discharge current (in amps) times the discharge period (in seconds).

Rearranging, C = (i x t) / E  =  (0.170 x 0.050) / 12  =  708 uF

If your supply has a 1000 uF output capacitor, or a 1000 uF bulk filter capacitor driving a regulator that does not go into an overcurrent shutdown, the solenoid will stay held in for at least 50 ms, even if the cap's voltage source is completely removed.

This method always yields a cap value that is larger than the exponential equation value.  That "true" value is 616 uF.

Note: Headroom - if the 48 V source is the output of a regulator circuit, and the regulator's input is a bulk filter cap with something like 60 V across it, and the regulator has a minimum 2 V Vin-Vout differential voltage, then the cap's discharge voltage range is 10 V larger and the required cap size is smaller.